1.

Consider the following code snippet. main() { char str[80]; gets(str); for(int i=0. len=0;str[il!=’\0′;i++.len++); cout<<“The length of the string is ” <<len;}Select the equivalent for the under lined statement from the following (a) int len = strlen(str) (b) int len = strcmp(str) (c) int len = strcount(str) (d) None of these

Answer»

(a) int len = strlen(str)



Discussion

No Comment Found

Related InterviewSolutions