You are on page 1of 7

C Programming Basic MCQs [set-2]

26. Queue is a _____________ list.

A. lifo

B. lilo

C. filo

D. fifo
o m
.c
Answer: D
te
a
M
27. The statement print f ("%d", 10 ? 0 ? 5 : 1 : 12); will print?
q
A. 10 c
B. 0
M
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

Download more at McqMate.com


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
o m
C. prints ascii equivalent of 100
.c
te
D. none of the above
a
Answer: C
q M
c
M
31. The _______ memory allocation function modifies the previous
allocated space.

A. calloc

B. free

C. malloc

D. realloc

Answer: D

32. Number of binary trees formed with 5 nodes are

A. 30

B. 36

C. 108

D. 42

Answer: D

33. The "C" language is

Download more at McqMate.com


A. context free language

B. context sensitive language

C. regular language

D. none of the above

Answer: A

34. The worst case time complexity of AVL tree is better in comparison to
binary search tree for

o m
A. search and insert operations
.c
B. search and delete operations
te
a
C. insert and delete operations

q M
c
D. search, insert and delete operations

Answer: D
M
35. In which tree, for every node the height of its left subtree and right
subtree differ almost by one?

A. binary search tree

B. avl tree

C. threaded binary tree

D. complete binary tree

Answer: B

36. C is ______ Language?

A. low level

B. high level

C. assembly level

D. machine level

Answer: A

Download more at McqMate.com


37. The Default Parameter Passing Mechanism is called as

A. call by value

B. call by reference

C. call by address

D. call by name

Answer: A

38. What is Dequeue? o m


.c
A. elements can be added from front
te
a
M
B. elements can be added to or removed from either the front or rear

q
C. elements can be added from rear
c
D. none of the above
M
Answer: B

39. In which linked list last node address is null?

A. doubly linked list

B. circular list

C. singly linked list

D. none of the above

Answer: C

40. Which is the correct syntax to declare constant pointer?

A. int *const constptr;

B. *int constant constptr;

C. const int *constptr;

D. a and c both

Answer: D

Download more at McqMate.com


41. printf("%d%d", book.price, book.page);

A. b. printf("%d%d", price.book, page.book);

B. .

C. printf("%d%d", price::book, page::book);

D. printf("%d%d", price->book, page->book);

Answer: A

42. A. double and chars o m


.c
A. b. floats and doubles
te
a
B. . ints

q M
C. and floats
c
D. ints and chars
M
Answer: D

43. A. The smallest individual units of c program

A. b. the basic element

B. ecognized by the compiler

C. the largest individual units of program

D. a & b both

Answer: D

44. B. Keywords have some unknown meanings and these meanings


cannot be

A. changed.

B. . keywords have some predefine meanings and these meanings cannot be

C. hanged.

D. none of the above

Answer: C

Download more at McqMate.com


45. B. Constants have fixed values that change during the execution

A. of a program

B. . constants have unknown values that may be change during the execution

C. of a program

D. none of the above

Answer: A

o m
46. A. int constant var =10;
.c
te
A. b. int
a
B. onst var = 10;
q M
C. const int var = 10;
c
D. b & c both M
Answer: D

47. A. Constant

A. b.

B. ariable

C. special symbol

D. none of the avobe

Answer: A

48. A. Halt execution of program

A. b. restart execution

B. f program

C. exit from loop or switch statement

D. none of the avobe

Answer: C

Download more at McqMate.com


Take Quick Mock/Practice test on this topic HERE

For Discussion / Reporting / Correction of any MCQ please visit discussion page by clicking on
'answer' of respective MCQ.

McqMate is also available on

PlayStore

o m
.c
te
a
q M
c
M

Download more at McqMate.com

You might also like