Hello World
Start your journey with the C programming language.
StartKey Concepts
Review core concepts you need to learn to master this subject
Syntax in C
Syntax in C
// Statements must end in a semicolon (;)
// correct
printf("Hello World!");
// error
printf("Hello World!")
// Code elements are case sensitive
// correct
printf("Hello World!");
// error
PRINTF("Hello World!");
The rules that dictate the correct format of code for a specific programming language are known as syntax.
Examples of syntax in C are:
- All statements must end with a semicolon,
;
- Keywords and other code elements are case-sensitive
When compiling C code, an error will occur when the syntax of the code is incorrect.
Hello World: Lesson
Lesson 1 of 1
- 1Congratulations on choosing to learn the C programming language! C has been around for quite some time and it is one of the foundational languages of computer science. C is an older language comp…
- 2So let’s look at our first C program! #include int main() { // output a line printf(“Hello World!\n”); } When this code is run the following text is displayed in the terminal. Hello World!…
- 3When writing in C, we need to follow a set of rules in order for the code to run properly. These rules are known as syntax. As we go through each lesson we will learn new syntax on the topics b…
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory