What will be the output of the following C code considering user typed jkl?
Posted: Wed Jul 13, 2022 7:54 pm
#include <stdio.h> int main() { char n[20]; fgets(n, 19, stdin); ungetc(n[0], stdin); printf("%s\n", n); return 0; }
a) jkl
b) kl
c) Undefined behaviour
d) jk
a) jkl
b) kl
c) Undefined behaviour
d) jk