Pointer MCQs
Practice free Pointer multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 253 questions — no login required.
Question 28easy
In C, what is a pointer to a function that takes no arguments and returns an integer?
Question 29easy
What is the result of the expression *ptr = NULL in C, where ptr is a pointer?
Question 30easy
In C, what is a pointer to a constant pointer (int* const)?
Advertisement
Question 31easy
Determine Output:
void main()
{
char far *farther, *farthest;
printf("%d..%d", sizeof(farther), sizeof(farthest));
}
Question 32easy
Determine Output:
main()
{
char *str1 = "abcd";
char str2[] = "abcd";
printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));
}Question 33easy
Choose the best answer. Prior to using a pointer variable
Advertisement
Question 34easy
Comment on the following pointer declaration?
int*ptr, p;Question 35easy
What will be the output?
main()
{
char *p;
p = "Hello";
printf("%cn",*&*p);
}Question 36easy
Determine output:
#include <stdio.h>
void main()
{
char *p = NULL;
char *q = 0;
if(p)
printf(" p ");
else
printf("nullp");
if(q)
printf("q");
else
printf(" nullq");
}