ecjb
ecjb

Reputation: 5459

How to remove the final "%" sign from the output in c with printf()

I have the following code:

#include <stdio.h>

int main(){
  printf("hello world");
}

The output is the following:

hello world%

Is there a way to remove the final "%" (which is actually black on white and not white on black like the other characters) of the output?

Upvotes: -2

Views: 564

Answers (2)

You can put printf("\n"); at the end of the int main().

Upvotes: 0

Karlo
Karlo

Reputation: 11

I think that is your shell prompt as @SteveSummit has said in the comment to the Question.

Upvotes: -1

Related Questions