Programming Lesson
Programming Lesson
Program
Group 2 : Inigo, Naomi Jia
INTRODUCTION
A computer program is a set of
statements or instructions given to a
computer to solve computing problems.
These instructions are carefully planned
and created by a programmer. The
programs contained specialized symbols
or characters and keywords. Some
keywords can only be used in
programming C.
INTRODUCTION
C has rules for putting words together
and for placing punctuation marks.
These rules are what we call the Syntax.
The program that checks the syntax of
programs written in C is called the
C Compiler.
01
C Compilers
ABOUT COMPILERS
Compilers are very specific with their
requirements and will fail to understand
incorrect program no matter how marginal the
errors are. That is why the programmers must
learn to be precise when writing codes.
A C program is built as a sequence of characters. Some characters
which can be used in C language are:
Alphabetic Special
Characters: Characters:
Uppercase (a-z) + - */ \ = & % # <
Numeric
Numbers: More examples:
Basic numbers (0-9) ?~{}()[]
02
Basics of C
THE BASICS OF C PROGRAM
Preprocessor Directives – Included here is any library required by the program. It is optional.
Constant and Type Definition Section – It contains the data defined as constant and the type names
required by the program. It is optional.
Declaration Section – It is where the data valuable declaration is placed, however, it is optional in C
Programs.
Statement Section – It is where the source code is placed. Every program constructed is required to
have this.
GENERALLY:
C Programs begin with a function.
To access a standard function that comes with the computer, the header with the # include directive is
placed.