Please see the source code
I am amazed
the scanf function has %[^\n] it should be %s
why this is working fine ??? what does this mean ??? ---> %[^\n] in scanf function ??

Source Code
PHP Code: 
#include<stdio.h>
#include<conio.h>
main()
{
    
char str[20];
    
clrscr();
    
scanf("%[^\n]",str);
    
printf("\n\n\n%s",str);
    
getch();


Output
prateek Reviewed by prateek on . Turbo C | scanf() | strange Please see the source code I am amazed the scanf function has % it should be %s why this is working fine ??? what does this mean ??? ---> % in scanf function ?? Source Code #include<stdio.h> #include<conio.h> main() { Rating: 5