?
What will be the output of the following C code considering user typed jkl?
What will be the output of the following C code considering user typed jkl?
#include <stdio.h>
int main()
{
char n[20];
fgets(n, 19, stdin);
ungetc(n[0], stdin);
printf("%s\n", n);
return 0;
}
#include <stdio.h>
int main()
{
char n[20];
fgets(n, 19, stdin);
ungetc(n[0], stdin);
printf("%s\n", n);
return 0;
}
Join the Discussion
Login to post a comment or share your explanation.
Login