This post contains 171-180 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.
171-180 Questions
Q1:The number of edges in a minimum cost spanning tree of n nodes is a) n b) n+1 c) n-1 d) 2n Answer:
Q2:
Traveling sales man problem is an application of a) spanning trees b) binary tree c) greedy method d) divide and conquer Answer:
Q3:
The number of extra pointers required to reverse a singly linked list is a) 1 b) 2 c) 3 d) 4 Answer:
Q4:
The number of extra pointers required to reverse a double linked list is a) 1 b) 2 c) 3 d) 4 Answer:
Q5:
The functions used for memory allocation a) malloc b) calloc c) a&b d) none of the above Answer:
Q6:
Linked lists uses __________ type of structures. a) nested structures b) self referential structures c) simple structures d)unions Answer:
Q7:
_________ cannot be used to represent Linked lists. a) arrays b) structures c) unions d) all the above Answer:
Q8:
Binary trees cannot be implemented using a) arrays b) unions c) single linked list d) all the above Answer:
Q9:
calloc(m,n) is equivalent to a) malloc(m*n,0) b) memset(0,m*n) c) ptr=malloc(m*n) d) malloc(m/n) Answer:
Q10:
Prim's and Krushkals algorithms are used for finding solution to a) BFS b) DFS c) traveling salesman problem d) none of the above Answer: