✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What will be the output of the following program:
#include <stdio.h>
int main() { char str0[] = "TEST"; char str1[4] = {'T', 'E', 'S', 'T'}; char str2[] = {'T', 'E', 'S', 'T','\0'};
int len0= strlen(str0); int len1= strlen(str1); int len2= strlen(str2);
printf("str0: %c\n", str0[3]); printf("LENGHT OF str 0: %d\n", len0); printf("str1: %c\n", str1[3]); printf("LENGHT OF str1 1: %d\n", len1); printf("str2: %c\n", str2[4]); printf("LENGHT OF str2 2: %d\n", len2);
return 0;
}
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!