K
kk
Hi all,
in the following code, i enter more characters into a character array.
array size declared as 80. i enter more characters then i get
segmentation fault. if anybody knows give me reply.
thanks in advance.
Regards
kk
main()
{
char s[80];
scanf("%[^\n]s",s);
printf("%s",s);
}
in the following code, i enter more characters into a character array.
array size declared as 80. i enter more characters then i get
segmentation fault. if anybody knows give me reply.
thanks in advance.
Regards
kk
main()
{
char s[80];
scanf("%[^\n]s",s);
printf("%s",s);
}