Join Examsbook
1076 0

Q: How would you find the length of each string in the following Program? main() {     char *str[] = { "Frogs", "Do", "Not" , "Die" , "They" , "Croak!"};     printf ("%d%d", sizeof (str), sizeof (str[0])); }

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

main() {    char *str[] = { "Frogs", "Do", "Not", "Die." , "They", "Croak!" };    int i;          for ( i = 0;i<=5;i++)          printf ("\n%s%d", str[i], strlen( str[i])); }

Are you sure

  Report Error

Please Enter Message
Error Reported Successfully