Programming Languages
C
Objective
Mar 08, 2013
What will be output of the following c code?
void main()
{
char *str;
scanf("%[^\n]",str);
printf("%s",str);
}
Detailed Explanation
Task of % [^\t] is to take the stream of characters until it doesn’t receive new line character ‘\t’ i.e. enter button of your keyboard.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts