Output (Print Text)
To output values or print text in C, you can use the printf()
function:
Example
#include <stdio.h>
int main() {
printf("Hello World!");
return 0;
}
To output values or print text in C, you can use the printf()
function:
#include <stdio.h>
int main() {
printf("Hello World!");
return 0;
}
A computer program is a list of “instructions” to be “executed” by a computer.
In a programming language, these programming instructions are called statements.
The following statement “instructs” the compiler to print the text “Hello World” to the screen: Continue reading C Statements
You have already seen the following code a couple of times in the first chapters. Let’s break it down to understand it better:
#include <stdio.h>
int main() {
printf("Hello World!");
return 0;
}
To start using C, you need two things:
There are many text editors and compilers to choose from. In this tutorial, we will use an IDE (see below).