0
#include <stdio.h>

main()
{
    printf("Good\bafternoon");
    return 0;
}

**Result - **

Eugene Sh.
  • 17,802
  • 8
  • 40
  • 61
  • 1
    This is your terminal/output device issue. What environment are you working with? Also what exactly are *expecting* it to do? – Eugene Sh. Jul 08 '22 at 17:59
  • Note that modern C (anything standard in this millennium) requires either `int main()` or (preferably) `int main(void)` when you plan to ignore the command-line arguments. You must specify the return type, and the return type should be `int`. If you're learning from materials which encourage you to omit the type, you should get something more recent to learn from — or persuade your instructor that we live in the 21st Century now and things which were OK in the 20th Century aren't always OK in the 21st. The C99 standard was the first to say that the return type is required for all functions. – Jonathan Leffler Jul 08 '22 at 18:35
  • See also [What should `main()` return in C and C++?](https://stackoverflow.com/q/204476/15168) – Jonathan Leffler Jul 08 '22 at 18:36
  • Also, `'\b'` is not a function but the backspace character constant. See [§6.4.4.4 Character constants](http://port70.net/~nsz/c/c11/n1570.html#6.4.4.4) and [§5.2.2 Character display semantics](http://port70.net/~nsz/c/c11/n1570.html#5.2.2). – Jonathan Leffler Jul 08 '22 at 18:37
  • Also, your question title references `Good<0x08>Afternoon` with a capital A; the code uses lower-case a. Be careful. C is a case-sensitive language and you must be consistent when writing C. (The best fix is to change the A to a in the title; the answer follows the code and you should avoid invalidating answers.) – Jonathan Leffler Jul 08 '22 at 18:40

1 Answers1

0

Are you trying to make it print "Gooafternoon"?

If so, the code is okay. The problem might be with your terminal.

This is my terminal output.

enter image description here