












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
its about C introduction: Basic structure, Algorithms, Flowcharts, Structure programming, keywords, constant, variable presentation.
Typology: Slides
1 / 20
This page cannot be seen from the preview
Don't miss anything!
Topics
Example
#include <stdio.h>
int main()
int a = 100 ;
printf ( “ %d ”,a );
return 0 ;
Header file
Main()
function
Variable
declaration
Body
return
Structure of c program
Algorithms
Definition :-
An algorithm is a process or step-by-step
instruction for solving a problem. They form
the foundation of writing a program.
Characteristics
Characteristics
Input / output
Finiteness
Definiteness
Effectiveness
Flowchart
Definition :-
A picture of the separate steps of a process in
sequential order.
Types of flowchart
Types of flowchart
System Flowchart Program Flowchart
Flowchart
d
Decision
Process
Connector
Flow line
Input / Output
Indicates any type of internal
operation inside the processor.
Used for any input / output ( I/O )
operation.
Used to ask a question.
Allows the flowchart to be drawn
without intersecting lines or without
a reverse flow.
Indicates the starting or ending of
program.
Shows direction of flow.
Terminator
Structured programming
constructs
Definition :-
Structured programming is a program written with
only the structured programming constructions –
Sequence.
Repetition.
Selection.
Lines or blocks of codes are written and executed
in sequential order.
Example :- C, C++, C#, Java, etc.
Sequence
Condition C?
Condition F?
Step A
Step C
Step B
Step D
Step E
No
Yes
Yes
No
Repetition
( loop )
Selection
Step A
Step B
If condition is true then
step D
Else
Step C
End if
While condition is true then
Step E
End while
C character set supports ASCII character sets.
For every character there is unique number in ASCII character set.
ASCII TABLE
Keywords
Keywords are the words whose meaning has
already been explained to the C compiler.
The keywords should not be used as an identifier
like Variable name or Constant name.
There only 32 keywords available in C.
Constants
Definition :-
Constant
Primary constant Secondary constant
Integer
Real
Character
Pointer
Array
String
Structure
Union
Enum
Example
Using #define Using const
#include <stdio.h>
#define PI 7.
Int main()
printf( “%.5f”,PI );
return 0 ;
#include <stdio.h>
Int main()
const int var = 6543 ;
printf( “%d”,var );
return 0 ;
o
Output :-
o
Output :-
Example
#include <stdio.h>
Int main()
int num1 = 65 ;
printf ( “ %d ”,num1);
return 0 ;
Memory
Location
num
Memory
Allocated
Variable Name
Value in stored in
memory
Addresses
( +VE integer )