C Programming MCQ - Constant Variables & Data Types

36:  

Which of the following are true regardless of the implementation ?

A.

sizeof(int) is not less than sizeof(long)

B.

 sizeof(double) is not less than sizeof(float)

C.

sizeof (int )equals sizeof(unsigned)

D.

both (b) & (c)

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



37:  

 Choose the correct statements

A.

casting refers to implicit type conversion

B.

coercion refers to implicit conversion

C.

casting refers to explicit type conversion

D.

both (b) & (c)

 
 

Option: D

Explanation :

Coercion is automatic conversion between compatible types and it is done by compiler

Click on Discuss to view users comments.

Write your comments here:



38:  

The value of an automatic variable that is declared but not initialized will be

A.

0

B.

-1

C.

unpredictable

D.

none of these

 
 

Option: C

Explanation :

Strictly speaking, it will have a garbage value. Some implementations initialize to 0 on declaration.

Click on Discuss to view users comments.

Write your comments here:



39:  

Choose the correct statements

A.

an identifier may start  with an underscore

B.

an identifier may end with an underscore

C.

IF is a valid identifier

D.

All of the above

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



40:  

Choose the correct statements

A.

during external variable definition, storage is set aside by the compiler

B.

during external variable declaration, no storage is set aside by the compiler

C.

the use of external variables may make debugging difficult

D.

All of the above

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here: