Search your topic here

PPL: Variable Initialization

VARIABLE INITIALISATION

MCQs on Variable Initialisation

Q1. Global variable are available to all functions. Does there exist a mechanism by way of which it available to some and not to others.
A. Yes
B. No

Q2. Which of the following special symbol allowed in a variable name?
A. * (asterisk)
B. | (pipeline)
C. _ (underscore)

Q3. By default a real number is treated as a
A. float
B. double
C. long double

Q4. Is the following statement a declaration or definition?
extern int i;
A. Declaration
B. Definition
C. Function

Q5. A float is 4 bytes wide, whereas a double is 8 bytes wide.
A. True
B. False

Q6. Size of short integer and long integer can be verified using the sizeof() operator.
A. True
B. False

Q7. Which of the declaration is correct?
A. int length;
B. char int;
C. int long;

Q8. Which of the following correctly represents a long double constant?
A. 6.68
B. 6.68L
C. 6.68f


MCQs Answers

Q1. (A)
Q2. (C)
Q3. (B)
Q4. (A)
Q5. (A)
Q6. (A)
Q7. (A)
Q8. (B)

LEAVE A REPLY