Multiple choice technology programming languages

What is the value stored in the variable x? Data test; name = ’TATA CONSULTANCY SERVICES’; b = ’C’; x = INDEX (name, b); Run;

  1. 2

  2. 23

  3. 6

  4. 5

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The INDEX function in SAS searches a character string for the first occurrence of a specified substring. In 'TATA CONSULTANCY SERVICES', the character 'C' first appears at position 6 (the first letter of 'CONSULTANCY').