Introduction to C

From Applied Science
Revision as of 19:04, 14 April 2022 by Wikiadmin (talk | contribs) (Created page with "Because the discipline is an introduction, the algorithms studied doesn't use the most advanced features of C. A lot of things aren't studied in this course, just the most elementary to understand how a program is executed. Due to the similarities between mathematics and even spoken language, you just have to read a code carefully to understand the order of the operations. <div style="text-align:center;">'''A short summary about the C language'''</div> * '''Keywords....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Because the discipline is an introduction, the algorithms studied doesn't use the most advanced features of C. A lot of things aren't studied in this course, just the most elementary to understand how a program is executed. Due to the similarities between mathematics and even spoken language, you just have to read a code carefully to understand the order of the operations.


A short summary about the C language


  • Keywords. They are reserved words, have a fixed and unchangeable meaning. For example: a function or variable cannot be named 'while', because 'while' already has a fixed meaning. The exception is text, we can print the word 'while' on screen because in this case, the word is treated as a char sequence, not as a command. The same applies for symbols such as commas and semicolons, the meaning is fixed and it must be used as pre-determined by the language's syntax.
  • The assignment operation. In the very beginning, to read a = 2 as "a is equal to two" is ok, because the variable 'a' has the value two after the assignment. But when we do arithmetic operations, then we have to read the assignment operation properly: "the value two is assigned to the variable a".