MCQs
Total Questions : 17
| Page 1 of 2 pages
Answer: Option C. -> pointer to function taking a char* argument and returns an int
pointer to function taking a char* argument and returns an int
Answer: Option A. -> x is a pointer to a string, y is a string
* is to be grouped with the variables not the data types.
Answer: Option C. -> int i; double* dp = &i;
dp is initialized int value of i.
Answer: Option A. -> *
*
Answer: Option D. -> point to a tye
A pointer can be in only 3 states a,b and c.
Answer: Option C. -> int ***fun(float*, char**)
int ***fun(float*, char**)
Answer: Option B. -> p now points to b
Assigning to refrence changes the object to which the refrence is bound.
Answer: Option D. -> it will return some random number
Array element cannot be address of auto variable. It can be address of static or extern variables.
Answer: Option A. -> fg
Pointer ptr points to string 'fg'. So it prints fg.
Answer: Option A. -> ABCDEFGHIJ
Each time we are assigning 65 + i. In first iteration i = 0 and 65 is assigned. So it will print from A to J.