Classical

C Programming MCQ - Arrays

31:  

 A set of names can be represented as a

A.

two-dimensional array of characters

B.

one-dimensional array of strings

C.

one-dimensional array of pointers to character

D.

All of above

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



32:  

 If arr is a two dimensional array of 10 rows and 12 columns, then arr (5) logically points to the

A.

sixth row

B.

Fifth row

C.

fifth column

D.

sixth column

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

shivani said: (5:05am on Tuesday 28th January 2014)
how its ans be sixth row.

Write your comments here:



33:  

While sorting a set of names, representing the names as an array of pointers is preferable to representing the names as a two dimensional array of characters because

A.

storage needed will be proportional to the size of the data

B.

execution will be faster

C.

swapping process becomes easier and faster

D.

All of the above

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



34:  

Choose the correct statements 

A.

an entire array can be passed as an  argument to a function

B.

a part of an array can be passed as argument to a function

C.

any change done to an array that is passed as an argument to a function will be local to the function

D.

Both (a) & (b)

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



35:  

Pick the correct answers
if x is an one dimensional array, then

A.

&x[ i ] is same as x + i - 1

B.

*(x + 1) is same as *(&x [ i ])

C.

*(x + i) is same as x[ i ] 

D.

both (b) & (c)

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:





Suggest an improvement