HOME C C++ PYTHON JAVA HTML CSS JAVASCRIPT BOOTSTRAP JQUERY REACT PHP SQL AJAX JSON DATA SCIENCE AI

C Output(Print Text)


In C programming, "outputting text" refers to the process of displaying information onto the screen or another designated output device.


To output values or print text in C, you can use the printf() function:
Example

#include <stdio.h>

int main() {

printf("Hello CodeLines!");

return 0;

}



Output


Hello CodeLines!



Double Quotes

Double quotation marks (") are used to define string literals, which are fixed sequences of characters.

If you forget the double quotes, an error occurs:


Example
Double Quotes


Many printf Functions


You can use as many printf() functions as you want. However, note that it does not insert a new line at the end of the output:

Example

#include <stdio.h>

int main() {

printf("Hello CodeLines!");

printf("I am learning C.");

printf("And it is awesome!");

return 0;

}



Output

Hello CodeLines!I am learning C.And it is awesome!