int ungetc(int iChar, FILE* qpStream);
#include <cstdio>
int main()
{
for (int i = 0; i < 8; ++i) {
int iChar = getchar();
// Put the second 'X' back so that
// we get it next time.
if (i == 3) {
ungetc(iChar, stdin);
}
printf("%c\n", (char)iChar);
}
return 0;
}
© 20072025 XoaX.net LLC. All rights reserved.