Skip to main contentSkip to solution

Which of the following returns a string type value?

Solution

✅ Correct Option: 3

mid() extracts a substring from a given string, so its result is itself a string. For example, mid("COMPUTER", 2, 3)\text{mid("COMPUTER", 2, 3)} returns "OMP".


Option 2: instr() works on strings but returns the position of a substring, which is an integer.

Options 1 and 4: mod() returns the remainder (a number), and dayofmonth() returns the day number (1 to 31) of a date.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question