Loading, please wait...

Pointers in C Programming MCQ (Multiple Choice Questions And Answers)

Search here for MCQs

Be Ready for the next job or online test practice for pointers in c programming

Pointers in C Programming MCQ (Multiple Choice Questions And Answers)

Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

List of Programming Full Forms 

1. Prior to using a pointer variable it should be

  • Initialized
  • Declared
  • Both A and C
  • None of the above

2. Output is

#include <stdio.h>
    int main()
    {
        int i = 10;
        void *p = &i;
        printf("%d\n", (int)*p);
        return 0;
    }
  • Segmentation fault/runtime crash
  • Compile time error
  • 20
  • Undefined Behaviour

3. Which is an indirection operator among the following?

  • *
  • &
  • #
  • %

4. Which of the following is most valid statement?

  • int*matrix; .....; free(void) matrix;
  • int*matrix; .....; if(matrix!=null) free(void*)matrix;
  • Both A and B
  • None of the above

5. Assume the output

#include<stdio.h>

int main()
{
    int y=128;
    const int x=y;
    printf("%d\n", x);
    return 0;
}
  • Garbage Value
  • Error
  • 128
  • 0