你如何在 C 中的同一行文本中键入内容

How do you type something on the same line of text in C

我想知道在 C 语言中如何在一行中键入内容?

这是它的正常输出方式。

输出

 > 
 <text>

相反

 > <text>

根据您的标签,我猜您正在使用 printf()。只需省略“\n”字符,即 "newline.".

也就是说。

printf("> "); printf("text\n");

这将打印:

> text