Multiple choice technology programming languages

char * Name[] = { "Ritesh", "Kumar" "Singh", "Happy", "Bittoo" "Roshan", "Go", }; How many elements does the array dwarves (declared above) contain?

  1. 4

  2. 5

  3. 6

  4. 7

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

In C, adjacent string literals are concatenated during compilation. 'Kumar' 'Singh' becomes 'KumarSingh', and 'Bittoo' 'Roshan' becomes 'BittooRoshan'. The array contains: 'Ritesh', 'KumarSingh', 'Happy', 'BittooRoshan', 'Go' = 5 elements.