Course Introduction to Programming
C Programming Language
In this class, we will understand why we should learn the C language; this class will be divided into:
- Why learn C?
- Characteristics of C language.
Why learn C?
The C programming language is considered to be fast to learn.
Some of the main reasons to learn C are:
- It has direct access to memory, i.e. we are able to do operations with computer memory, and this makes C a very cool language for learning how to handle computer memory. Other languages usually hide this from a programmer.
- It allows us to implement intermediate steps of operations, i.e. whenever we want to do something, we can implement it step by step, while some languages already give the implementation ready.
- In C we have to specify every detail of what we want to do, that's good to understand how things work, and that's what we want a computer scientist to know. It's no use just knowing the final result of an operation, we have to know the steps of that operation to really understand how it works.
Features of the C language.
High level language:
The commands are similar to natural language.
Some examples of C language commands:
- printf = print
- scanf = read
- pow = power of
- if = if
- else = otherwise
Compiled Language:
It means that when we want to generate an executable from C code, we must use a compiler. Changes to the code do not automatically change the executable, so every time we edit a code, we have to compile the code again to update the executable.
Imperative:
The code is formed by a sequence of orders. This makes the language much easier to learn because it follows a simple sequence of execution, we give it a sequence of orders (do this, do that...) and in the end, it does what we want.
CaseSensitive:
C language can distinguish small letters and capital letters
E.g:
- a != A
- ronaldo != ronaLdo
- printf != Printf
- Julio != JuLIo
- thalyson != ThAlYsOn
So we have to pay a lot of attention. Usually, those who are starting to learn C make a lot of mistakes regarding CaseSensitive, writing words in capital letters and not understanding that they are completely different things.
That's it for now, until the next time ๐