I have done it 4-5 years ago, that to read a whole line of text (including space) using scanf function.
When I was preparing for my exams, I went back to the old days of a “C” student. Nowadays I’m a bit used with C++. So I forgot the format specifier to specfy inside the scanf function. Finally my memory retrieved it back
Here’s it is:
char name[100];
printf(“Enter the name:”);
scanf(“%[^\n]“,name);
Something cool no?