C Programming MCQ - Array And String
11. Length of the string "letsfindcourse" is
View Answer
12. How will you print
on the screen?
View Answer
13. If the two strings are identical, then strcmp() function returns
View Answer
14. Which of the following statements are correct ?
1: A string is a collection of characters terminated by '.
2: The format specifier %s is used to print a string.
3: The length of the string can be obtained by strlen().
4: The pointer CANNOT work on string.
View Answer
15. Let x be an array.Which of the following operations is illegal?
i) ++x.
ii) x+1.
iii) x++.
iv) x*2.
View Answer
16. Strcat function adds null character
View Answer
17. Which of the following function sets first n characters of a string to a given character?
View Answer
18. The library function used to find the last occurrence of a character in a string is
View Answer
19. Which of the following gives the memory address of the first element in array foo, an array with 10 elements?
View Answer
20. What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?
View Answer
Also check :