Pointers Questions and Answers
Practice ModeShowing 10 of 217 questions
Q71
The declaration float (*fp())(); is
Answer: Option B
Q72
When applied to a variable, what does the unary "&" opertor yield ?
Answer: Option B
Q73
Which of the following is the most accurate statement about runtime memory ?
1. Memory is allocated by using malloc ()
2. Memory is freed by a garbage collector
3. Allocated memory can be freed by calling free ( )
Answer: Option D
Q74
Which of the following is true about pointers ?
1. Pointers do not require memory storage.
2. The size of a pointer depends on the type of the variable it points to.
Answer: Option D
Q75
Which of the following is True about pointers ?
1. Pointers do not require memory storage.
2. The size of a pointer depends on the type f the variable it points to.
Answer: Option D
Q76
If ptrl and ptr2 are valid pointers in the same array, then which of the following statements is valid ?
Answer: Option D
Q77
char *x;
x = "AMMA";
is the above code valid ?
Answer: Option C
Q78
char *x = NULL;
printf ("%s\n", x);
What will be the behaviour o the sample code above ?
Answer: Option B
Q79
char base [5] = "a" ;
const char *ptr;
Given the above, which of the following statements is legal ?
Answer: Option A
Q80
char *ptr;
char string [ ] = "project";
ptr = string;
ptr += (ptr + 5);
What string does ptr contain in the sample code above ?
Answer: Option D