Classical

C Programming MCQ - Constant Variables & Data Types

16:   A static variable
A. cannot be initialized
B. is initialized once at the commencement of execution and cannot be changed at run time
C. retains its value throughout the file of the program
D. is same as an automatic variable but is placed at the head of a program
 
 

Option: C

Explanation :


17:   The statement
# include < math.h>
is written at the top of a program to indicate
A. beginning of the program
B. beginning of the program
C. that certain information about mathematical library functions are to be included at the begnning of the program
D. none of these
 
 

Option: C

Explanation :


18:  

The declarations
typedef float hight [100];
height men, women;

A. define men and women as 100 element floating point arrays
B. define men and women as floating point variables
C. define height, men and women as floating point variables
D. are illegal
 
 

Option: A

Explanation :


19:   In case of ordinary int variables
A. leftmost bit is reserved for sign
B. rightmost bit is reserved for sign
C. no bit is reserved for sign
D. none of these
 
 

Option: A

Explanation :


20:   If a is an unsigned integer variable whose value is hx6db7, what is the value of -a?
A. h llhhhhl
B. hxhhl
C. hx248
D. hx9248
 
 

Option: D

Explanation :




Suggest an improvement