NSCT – Strings & Text Processing MCQs 20 min Score: 0 Attempted: 0/20 Subscribe 1. What is a string in programming? (A) A Boolean value (B) A type of number (C) A sequence of characters (D) A loopShow All Answers 2. Which data type is used to store text? (A) int (B) float (C) str (D) boolShow All Answers 3. Which of the following is used to combine two strings? (A) Subtraction (B) Division (C) Concatenation (D) MultiplicationShow All Answers 4. Which operation is used to find the length of a string? (A) length (B) size (C) len (D) countShow All Answers 5. Strings are usually: (A) Mutable (B) Immutable (C) Numeric (D) BooleanShow All Answers 6. Which of the following allows extracting a part of a string? (A) Slicing (B) Concatenation (C) Reversal (D) AdditionShow All Answers 7. What is it called when all letters of a string are converted to uppercase? (A) Uppercasing (B) Capitalization (C) Formatting (D) ReversingShow All Answers 8. What is it called when all letters of a string are converted to lowercase? (A) Lowercasing (B) Capitalization (C) Formatting (D) ReversingShow All Answers 9. Which operation removes spaces from the beginning and end of a string? (A) Slice (B) Split (C) Join (D) StripShow All Answers 10. Which operation splits a string into parts based on a separator? (A) Join (B) Slice (C) Strip (D) SplitShow All Answers 11. Which operation joins multiple strings into one using a separator? (A) Join (B) Split (C) Strip (D) SliceShow All Answers 12. How are individual characters in a string accessed? (A) Using variables (B) Using loops only (C) Using indexes (D) Using functions onlyShow All Answers 13. Which operator is commonly used to combine strings? (A) + (B) (C) * (D) /Show All Answers 14. Which of the following can search for a specific substring in a string? (A) Strip (B) Replace (C) Find (D) JoinShow All Answers 15. Which operation replaces a part of a string with another string? (A) Strip (B) Split (C) Join (D) ReplaceShow All Answers 16. Which method checks if a string starts with a specific substring? (A) endswith (B) find (C) startswith (D) replaceShow All Answers 17. Which method checks if a string ends with a specific substring? (A) endswith (B) startswith (C) find (D) replaceShow All Answers 18. Which of the following counts the occurrences of a character or substring in a string? (A) replace (B) length (C) find (D) countShow All Answers 19. Strings in most programming languages are: (A) Sequences of numbers (B) Sequences of characters (C) Sequences of Booleans (D) Sequences of functionsShow All Answers 20. Text processing is mainly used to: (A) Handle and manipulate textual data (B) Perform calculations (C) Create loops (D) Store Boolean valuesShow All Answers