C MCQs for placement and exams - Set 3
1.) Smallest element of array's index is calleda.) lower bound
b.) upper bound
c.) range
d.) Extraction
View Answer / Hide Answer2.) O(N)(liner time) is better than O(1) constant time.a.) TRUE
b.) FALSE
View Answer / Hide Answer3.) 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 AnswerANSWER: 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 AnswerANSWER: 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 Answer6.) 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 Answer7.) fputs function is used toa.) 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 AnswerANSWER: 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 AnswerANSWER: 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 AnswerANSWER: 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 AnswerANSWER: d.) _ (underscore)