C String Test 26) What will be the output of the below program?
The correct option is (b). Explanation: The function strlen() returns the number of character in the string. Therefore, strlen("javaTpoint") returns 10 Hence the output of the program is "10". 7) Which of the following statements are correct about string?
The correct option is (c). Explanation: Clearly the statement 1, 2 and 4 are correct about the string but the statement 3 is incorrect because we can use pointer on strings. For example: char *p="javaTpoint" 8) For the following statements will arr[2] and ptr[2] fetch the same character?
The correct option is (b). Explanation: Yes, for arr[2] and ptr[2] both the statements will prints the same character 'v'. 9) Which of the statements are correct about the below program?
The correct option is (a). Explanation: The program converts the enter string to upper case string. Output: 10) Determine the wrong file opening mode from the following.
The correct option is (c). Explanation: File opening mode "x" is incorrect because there is no such mode exists for file opening operation in C language. |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India