C Array Test 26) What will be the output of the below program?
The correct option is (c). Explanation: In program *x refers to 100 and adding a 1 to *x gives 101. Therefore the output is101. 7) In the below statement, what does the "arr" indicates?
The correct option is (b). Explanation: The Square parenthesis signifies an array at declaration and the type is char *. So it is an array of character pointer. Therefore "arr" is an array of 20 character pointers. 8) What will be the output of the below program?
The correct option is (d). Explanation: In program 'a' refers to constant address and the constant address variable is not allowed to be incremented. Therefore the program will generate compile error in output. 9) Which of the statements are correct about 5 used in the program?
The correct option is (a). Explanation: The statement int num[5]; specifies the size of array and num[5]=20; specifies the particular element (6th element) of the array. Therefore in first statement 5 specifies an array size, whereas in second element it specifies a particular element of an array. 10) Which of the below statements using the name of an array does not yield the base address?
The correct option is (a). Explanation: The statement 1 and 4 does not yield the base address of an array. While the printf() and scanf() yields the base address of an array. |