C MCQs for placement and exams - Set 9

C MCQs for placement and exams - Set 9


1.) If every node u in G is adjacent to every other node v in G, A graph is said to be
a.) isolated
b.) complete
c.) finite
d.) strongly connected
View Answer / Hide Answer

ANSWER: b.) complete




2.) In a Heap tree
a.) Values in a node is greater than every value in left sub tree and smaller than right sub tree  
b.) Values in a node is greater than every value in children of it
c.) Both of above conditions applies
d.) None of the mentioned
View Answer / Hide Answer

ANSWER: b.) Values in a node is greater than every value in children of it




3.) In a binary tree, certain null entries are replaced by special pointers which point to nodes higher in the tree for efficiency. These special pointers are called
a.) Leaf
b.) branch
c.) path  
d.) thread
View Answer / Hide Answer

ANSWER: d.) thread




4.) To use the function tolower(), which of the following header file should be used
a.) string.h
b.) conio.h
c.) ctype.h
d.) None of the mentioned
View Answer / Hide Answer

ANSWER: c.) ctype.h




5.) What is function overloading?
a.) calling a function from another function
b.) having more than one function of same name
c.) calling a function from itself
d.) None of the mentioned
View Answer / Hide Answer

ANSWER: b.) having more than one function of same name




6.) The size of a structure can be determined by 

a. size of variable name
b. sizeof(struct tag)

a.) Only a
b.) Only b
c.) Both a and b
d.)none of the above
View Answer / Hide Answer

ANSWER: c.) Both a and b




7.) fputs function is used to
a.) write characters to a file
b.) takes 2 parameters
c.) returns a character
d.) requires a file pointer
e.) write characters to a file, takes 2 parameters, returns a character
View Answer / Hide Answer

ANSWER: e.) write characters to a file, takes 2 parameters, returns a character




8.) Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?
a.) rem = 3.14 % 2.1;
b.) rem = modf(3.14, 2.1);
c.) rem = fmod(3.14, 2.1);
d.) Remainder cannot be obtain in floating point division.
View Answer / Hide Answer

ANSWER: c.) rem = fmod(3.14, 2.1);




9.) What are the types of linkages?
a.) Internal and External
b.) External, Internal and None
c.) External and None
d.) Internal
View Answer / Hide Answer

ANSWER: b.) External, Internal and None




10.) Which of the following special symbol allowed in a variable name?
a.) * (asterisk)
b.) | (pipeline)
c.) - (hyphen)
d.) _ (underscore)
View Answer / Hide Answer

ANSWER: d.) _ (underscore)


Post your comment