Pointer MCQ Question on C Language

Pointer MCQ Question on C Language

Home | C Language | Pointer

In this section we provide lots of objective question of Pointer

Page: 1/3

1) What is (void*)0?

2) Can you combine the following two statements into one?

   char *p; 
p = (char*) malloc(100);

3) In which header file is the NULL macro defined?

4) How many bytes are occupied by near, far and huge pointers (DOS)?

5) If a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable?

6) What would be the equivalent pointer expression for referring the array element a[i][j][k][l]

7) A pointer is

8) The operator used to get value at address stored in a pointer variable is

9) What will be the output of the following C code?

#include <stdio.h>
int main()
char *p = NULL;
char *q = 0;
if (p)
printf(" p ");
if (q)
printf(" nullq\n");

10) What will be the output of the program ?

int main()
static char *s[] = {"black", "white", "pink", "violet"};
char **ptr[] = {s+3, s+2, s+1, s}, ***p;
p = ptr;
printf("%s", **p+1);
return 0;

Download MCQ PDF