#include<stdio. h>
main()
{
char line[80];
scanf("%[^\n]", line);
printf("%s", line);
}
it will read and print the line but what is "%[^\n]" in general we
gives %s, %c .
i searched about it but i still its not clear .
please clear me "%[^\n]" how it is working and geting line with space
till end .
main()
{
char line[80];
scanf("%[^\n]", line);
printf("%s", line);
}
it will read and print the line but what is "%[^\n]" in general we
gives %s, %c .
i searched about it but i still its not clear .
please clear me "%[^\n]" how it is working and geting line with space
till end .
Comment