Programming - Arrays - Discussion

You Are Here :: Home > C++ Language > Arrays - Discussion

 



Q.

Suppose that nameStr is a character array of size 21. Which of the following statements is valid in C++?
(i)
if(strcmp(nameStr, "Lisa") == 0)
cout<(ii)
if(nameStr[0] == 'L')
cout<                        


A. Only (i) B. Only (ii)
C. Both (i) and (ii) D. None of these

Answer: Option B
Explaination:

 


No Explanation




Discussion

Your Comments Goes here...
NameDiscussion