Explore topic-wise MCQs in C Interview.

This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your C Interview knowledge and support exam preparation. Choose a topic below to get started.

1.

Calling a function f with a an array variable a[3] where a is an array, is equivalent to __________

A. f(a[3])
B. f(*(a + 3))
C. f(3[a])
D. all of the mentioned
Answer» B. f(*(a + 3))
2.

int (*fn_ptr)(int, int) = multi;

A. int *fn_ptr(int, int) = multi;
B. int *fn_ptr(int, int) = &multi;
C. none of the mentioned
Answer» B. int *fn_ptr(int, int) = &multi;
3.

Compile time error, declaration of a function inside main

A. Compile time error, no definition of function fn_ptr
B. Compile time error, illegal application of statement fn_ptr = add
C. No Run time error, output is 5
Answer» B. Compile time error, illegal application of statement fn_ptr = add
4.

What is the syntax for constant pointer to address (i.e., fixed pointer address)?

A. const <type> * <name>
B. <type> * const <name>
C. <type> const * <name>
D. none of the mentioned
Answer» C. <type> const * <name>
5.

What type of initialization is needed for the segment “ptr[3] = ‘3’;” to work?$

A. char *ptr = “Hello!”;
B. char ptr[] = “Hello!”;
C. both char *ptr = “Hello!”; and char ptr[] = “Hello!”;
D. none of the mentioned
Answer» C. both char *ptr = ‚Äö√Ñ√∂‚àö√ë‚àö‚à´Hello!‚Äö√Ñ√∂‚àö√ë‚àöœÄ; and char ptr[] = ‚Äö√Ñ√∂‚àö√ë‚àö‚à´Hello!‚Äö√Ñ√∂‚àö√ë‚àöœÄ;
6.

Memory holding “this” is cleared at line 3

A. Memory holding “this” loses its reference at line 3
B. You cannot assign pointer like in Line 3
C. Output will be This, Program
Answer» C. Output will be This, Program