C Programming MCQ - Mixed Bag

26:  

Choose the correct statement.

A.

The scope of a macro definition need not be the entire program

B.

The scope of a macro definition extends from the point of definition to the end of the file

C.

New line is a macro definition delimiter and it may go beyond a line.

D.

All of the above

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



27:  

The use of macro in the place of functions

A.

reduces execution time

B.

increases code size

C.

increases execution time

D.

both (a) & (b)

 
 

Option: D

Explanation :

Use of functions involves storing the current contents and branching to its starting address. These things add to the execution time. On the other hand, macro substitution increases the code size. This is of serious concern, if the macro is used in many places.

Click on Discuss to view users comments.

Write your comments here:



28:  

 The process of transforming one bit pattern into another by bit-wise operations is called

A.

masking

B.

pruning

C.

biting 

D.

chopping

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



29:  

How many bits are absolutely necessary to store an ASCII character?

A.

7

B.

C.

16

D.

15

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



30:  

If 7 bits are used to store a character, the percentage reduction of needed storage will be

A.

22.5

B.

2.5

C.

8

D.

12.5

 
 

Option: D

Explanation :

For each 8 bits one can save 1 bit. So percentage reduction will be 1 / 8 * 100 i.e.. 12.5%.

Click on Discuss to view users comments.

Write your comments here: