Placement papers on C - Set 3

Placement papers on C - Set 3


1. Smallest element of array's index is called

lower bound
upper bound
range
Extraction
View Answer / Hide Answer

ANSWER: lower bound




2. O(N)(liner time) is better than O(1) constant time.

TRUE
FALSE
View Answer / Hide Answer

ANSWER: FALSE




3. What is the maximum number of dimensions an array in C may have ?

two
eight
twenty
theoratically no limit only practical limits are memory size and compilers
View Answer / Hide Answer

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




4. Array passed as an argument to a function is interpreted as

Address of the array
Values of the first elements of the array
Address of the first element of the array
Number of element of the array
View Answer / Hide Answer

ANSWER: Address of the first element of the array




5. Which of the following is the correct way of declaring a float pointer:

float ptr;
float *ptr;
*float ptr;
None of the above
View Answer / Hide Answer

ANSWER: float *ptr;




6. The size of a structure can be determined by
a.size of variable name
b. sizeof(struct tag)

Only a
Only b
Both a and b
none of the above
View Answer / Hide Answer

ANSWER: Both a and b




7. fputs function is used to

write characters to a file
takes 2 parameters
returns a character
requires a file pointer
1,2 and 3 are correct
View Answer / Hide Answer

ANSWER: 1,2 and 3 are correct




8. Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?

rem = 3.14 % 2.1;
rem = modf(3.14, 2.1);
rem = fmod(3.14, 2.1);
Remainder cannot be obtain in floating point division.
View Answer / Hide Answer

ANSWER: rem = fmod(3.14, 2.1);




9. What are the types of linkages?

Internal and External
External, Internal and None
External and None
Internal
View Answer / Hide Answer

ANSWER: External, Internal and None




10. Which of the following special symbol allowed in a variable name?

* (asterisk)
| (pipeline)
- (hyphen)
_ (underscore)
View Answer / Hide Answer

ANSWER: _ (underscore)



Post your comment