C Interview Questions and Answers pdf

21. What is function?
A. Function is a block of statements that perform some specific task.
B. Function is the fundamental modular unit. A function is usually designed to perform a specific task.
C. Function is a block of code that performs a specific task. It has a name and it is reusable
D. All the above
Answer : D

22. Which one of the following sentences is true ?
A. The body of a while loop is executed at least once.
B. The body of a do ... while loop is executed at least once.
C. The body of a do ... while loop is executed zero or more times.
D. A for loop can never be used in place of a while loop.
Answer : B

23. A binary tree with 27 nodes has _______ null branches.
A. 54
B. 27
C. 26
D. None of the above
Answer : D

24. Which one of the following is not a linear data structure?
A. Array
B. Binary Tree
C. Queue
D. Stack
Answer : B

25. Recursive functions are executed in a?
A. First In First Out Order
B. Load Balancing
C. Parallel Fashion
D. Last In First Out Order
Answer : D

26. Queue is a _____________ list.
A. LIFO
B. LILO
C. FILO
D. FIFO
Answer : D

27. The statement print f ("%d", 10 ? 0 ? 5 : 1 : 12); will print?
A. 10
B. 0
C. 12
D. 1
Answer : D

28. To represent hierarchical relationship between elements, which data structure is suitable?
A. Priority
B. Tree
C. Dqueue
D. All of the above
Answer : B

29. Which of the following data structure is linear type?
A. Strings
B. Queue
C. Lists
D. All of the above
Answer : D

30. The statement printf("%c", 100); will print?
A. prints 100
B. print garbage
C. prints ASCII equivalent of 100
D. None of the above
Answer : C

0 comments: