C Programming MCQ - Mixed Bag

51:  

 Length of the string " correct " is

A.

7

B.

8

C.

6

D.

implementation dependent

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



52:  

Which of the following comments regarding the reading of a string using scanf( with %s option and gets, is true ?)

A.

both can be used interchangebly

B.

scanf is delimited by end of line, while gets is not

C.

scanf  is delimited by blank space, while gets is not

D.

none of above

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



53:  

The  following program fragment

    int m, n, b = m = n =8 ;
    char wer [80] ;
    sprintf ( wer, " %d%d%d ", m, n, b ) ;
    puts ( wer )
;

A.

prints the string 8 8 8

B.

prints the null string

C.

prints the string 888

D.

none of above

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



54:  

A string that is a formal parameter can be declared

A.

an array with empty bracket

B.

a pointer to character

C.

a pointerto a character

D.

both (a) & (b)

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



Related MCQ