Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

The Basics of C

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.

 Main Function Heading – It is a collection of commands that tells C program to do something.


It is required.

 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.

 The function that begins a C program is called “Main”

 To access a standard function that comes with the computer, the header with the # include directive is
placed.

 Semicolon terminates executable statements in C Program.


03
ACTIVITY
EXERCISE

• What are the five Basics of


C Program?

• What is the function that


begins a C Program?

• What terminates executable


statements in C?
04
END
THANKS
FOR
LISTENING
!
CREDITS: This presentation template was created by
Slidesgo, incluiding icons by Flaticon, and
infographics & images by Freepik.

You might also like