C Programming Language Interview Questions Quiz (Multiple Choice)

Spread the love

C Programming Language

C Programming Language

1 / 25

Which of the following statements about pointers in C is true?

2 / 25

What is the output of the following code: int a = 5; printf("%d", a++ + ++a);

3 / 25

Which of the following functions can dynamically allocate a 2D array in C?

4 / 25

What is the correct way to declare a pointer to a function in C?

5 / 25

What will be the output of sizeof('A') in C?

6 / 25

What is the output of printf("%d", sizeof(printf("hello")));

7 / 25

Which of the following is not a valid way to pass parameters in C?

8 / 25

What is the result of the expression (1 << 3) in C?

9 / 25

Which of the following statements correctly describes static variables in C?

10 / 25

What will happen if you try to modify a string literal in C?

11 / 25

What is the purpose of the 'volatile' keyword in C?

12 / 25

Which of the following is true about 'enum' in C?

13 / 25

What will be the output of: printf("%d", strcmp("abc", "abd"));

14 / 25

Which of these is used to prevent multiple inclusions of a header file?

15 / 25

What is the output of the expression (5 & 3) in C?

16 / 25

Which of the following statements is correct about recursion in C?

17 / 25

What does the 'extern' keyword indicate?

18 / 25

Which of the following functions can be used to copy a string safely in C?

19 / 25

What will be the result of 'printf("%d", 10 % 3);'?

20 / 25

What is the output of the following code? int x=5; printf("%d", x+++x);

21 / 25

Which of the following describes a void pointer?

22 / 25

What will happen if you free the same memory twice in C?

23 / 25

Which of the following statements about macros is correct?

24 / 25

Which of these can be used to terminate a program immediately?

25 / 25

Which function is used to move the file pointer to a specific location in C?

Your score is

The average score is 12%

0%

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *