C MCQs for placement and exams - Set 3

C MCQs for placement and exams - Set 3


1.) Smallest element of array's index is called
a.) lower bound
b.) upper bound
c.) range
d.) Extraction
View Answer / Hide Answer

ANSWER: a.) lower bound




2.) O(N)(liner time) is better than O(1) constant time.
a.) TRUE
b.) FALSE
View Answer / Hide Answer

ANSWER: b.) FALSE




3.) what is the maximum number of dimensions an array in C may have ?
a.) two
b.) eight
c.) twenty
d.) theoratically no limit only practical limits are memory size and compilers
View Answer / Hide Answer

ANSWER: d.) theoratically no limit only practical limits are memory size and compilers




4.) Array passed as an argument to a function is interpreted as 
a.) Address of the array
b.) Values of the first elements of the array
c.) Address of the first element of the arrayd.) Number of element of the array 
View Answer / Hide Answer

ANSWER: c.) Address of the first element of the array




5.) Which of the following is the correct way of declaring a float pointer: 
a.) float ptr;
b.) float *ptr;
c.) *float ptr;
d.) None of the above
View Answer / Hide Answer

ANSWER: b.) float *ptr;




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: c.) 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