Array size in c/c++

main()
{
char str[7]=”learning”;
printf(“%s”,str);
}
Tutorial answer:
Error
Debugging solution:
Array it assign only 7 character but in the learning string it has 8 character string so it will display error

Post a Comment

0 Comments