Table of contents
C is one of the oldest programming languages. Every advanced programming language that you use today has some of its roots in C programming.
C is simple to understand. It uses blocks to separate pieces of code performing different tasks. This makes programming easier. And this is easy to understand.
C++ and Java are amongst the most widely used programming languages today. They derive the concepts and syntax from C programming language.
If you want to become a game developer you need to learn C. It has been used to code various small games and some tasks in bigger games as well.
How to get started with C
To get started with C first download visual studio pro. And lets get started printing Hello world.
Open a new fine named Hello.c and type this syntax.
After typing the following syntax click on the play button on the top right corner to compile the code.
After that go to the terminal and type
gcc Hello.c
.\a.exe
This runs the code and Hello World gets printed in the terminal
Variables
Variable - Named location of something which stores data.
Eg for variable- Int number=25; Char num=25; Variables are case sensitive
Constants
A name given to the variable whose values can't be altered or changed. Intiger, Real, Character Constant.
Comments
An explanation or description of the source code of the program. // Sing line comment // /*Multiple line comments*/ .Comments do not get printed in the compiler.
Some Important Keywords are
auto double int struct
break else long switch
case enum register typedef
char extern return union
continue for signed void
do if static while
default goto sizeof volatile
const float short unsigned
C is the first step in programming and is important and simple, and beginner friendly. Hope you have fun learning it.