C Programming: Declarations and Initializations – General Questions
- Declarations and Initializations – General Questi
- Declarations and Initializations – Find Output of Program
- Declarations and Initializations – Point Out Errors
- Declarations and Initializations – Point Out Correct Statements
- Declarations and Initializations – True / False Questions
- Declarations and Initializations – Yes / No Questions
General Questions
1. 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. The remainder cannot be obtained in the floating-point division.
2. What are the types of linkages?
A. Internal and External
B. External, Internal and None
C. External and None
D. Internal
3. Which of the following special symbol allowed in a variable name?
A. * (asterisk)
B. | (pipeline)
C. – (hyphen)
D. _ (underscore)
4. Is there any difference between the following declarations?
1. extern int fun();
2. int fun();
A. Both are identical
B. No difference, except extern int fun(); is probably in another file
C. int fun(); is overrided with extern int fun();
D. None of these