C Array Test 416) What is 'y' in the below program?
The correct option is (b). Explanation: The statement typedef char (*(*arrfptr[4])())[20]; means arfptr is an array of 3 function pointer which will return an array of 20 dimension whose data type is char. Therefore 'x' is an array of three function pointers. 17) The return keyword is used for transfer control from a function back to the calling function.
The correct option is (a). Explanation: In C, the return function stops the execution of function and returns the control with value to the calling function. Execution is begins in calling function by instantly following the call. 18) What will be the output of the below program?
The correct option is (c). Explanation: The two possible methods of accessing structure elements using pointer is by using * or -> (arrow operator). Therefore the output of a program is 4 4 4. 19) What will be the output of the below program?
The correct option is (d). Explanation: In the program invalid syntax is used for initializing the array. Therefore compile error occurs in the output of a program. 20) Find out whether both the loops in a program prints the correct string length?
The correct option is (c). Explanation: In while loop the incorrect string length is printed because while loop variable 'i' get incremented after checking for '\0', hence giving 1 more than the length of string. Therefore only for loop prints the correct string length. |
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