Contents

Which function duplicates a string in newly created space?
a) strset ()                             
b) strnset ()
c) strdup ()                           
d) strupr ()

c

Which of the following operator can be used for concatenating two strings?
a) +                        
b) +=      
c) &                       
d) ||

c

Which of the following method is used to obtain length of string?
a) get ()                                 
b) sizeof ()
c) lengthof ()                        
d) length ()

d

Which of the following constructor is used to create empty string?
a) String ()                           
b) String (void)
c) String (0)                          
d) none of these

a

What format specifier is used to print a string?
a) %c     
b) %C    
c) %s     
d) %w

c

What is the maximum length of a C string?
a) 32 characters
b) 64 characters
c) 256 characters
d) none of these

d