#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
What will be the output of the following C code considering user typed jkl?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What will be the output of the following C code considering user typed jkl?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!