14 lines
309 B
C
Raw Normal View History

2025-01-07 21:10:07 +01:00
#include <stdio.h>
#include <string.h>
int main()
{
char a[20]="Program";
char b[20]={'P','r','o','g','r','a','m','\0'};
/* using the %zu format specifier to print size_t*/
printf("Length of string a = %zu \n",strlen(a));
printf("Length of string b = %zu \n",strlen(b));
return 0;
}