Professional Documents
Culture Documents
MODULE-1 (REVISION)
INTRODUCTION TO C LANGUAGE - PRE-PROCESSOR DIRECTIVES,
HEADER FILES, DATA TYPES AND QUALIFIERS. OPERATORS AND
EXPRESSIONS. DATA INPUT AND OUTPUT, CONTROL STATEMENTS.
INTRODUCTION TO C LANGUAGE
Introduction to C
History of C Programming Language
Structure with diagram
Compilation process with diagram
Rules for writing a C program
C Tokens and Keywords
o Six types of tokens
o Identifiers and rules
PRE-PROCESSOR DIRECTIVES
Definition
Two types
o Macros
Definition
Example
o Header files
Two Categories
Programmer defined
Comes with compiler
o Different header files and functions
# include<stdio.h>
# include<conio.h>
# include<math.h>
# include<string.h>
# include<time.h>
Advantages of using pre-processor directives
C DATA TYPES
Two categories
1. Fundamental data type (keyword, size, eg.)
Integer
Floating
Character
2. Derived Data type
Array
Structure
Pointer
Enumerated
Definition
Example
C QUALIFIER
Two types
1. Const
Definition
Syntax
Example
2. Volatile
Definition
Syntax
Example
Definition
Commonly used input and output function
1. scanf() with example
definition
syntax
format specifiers
conversion characters
2. printf() with example
3. getchar() and putchar() with example
4. gets() and puts() with example
5. getch() and getche() with example
CONTROL STATEMENTS
Definition
Four types
1. Decision statements
Definition
Three types (Definition, General Format, Flowchart, eg.)
I. If
II. If..else
III. If..elseif...else
2. Selection statements
Definition
Switch statement
I. General format
II. Flow chart
III. example
3. Iteration statements
Definition
Three types (Definition, General Format, Flowchart, eg.)
I. while()
II. do..while()
III. for()
Different between while() and do..while()
4. Jump Statement
Definition
Three types(Definition, General Format, Flowchart, eg.)
I. break
II. continue
III. goto