ADITYA POLYTECHNIC Bee1
ADITYA POLYTECHNIC Bee1
MICRO PROJECT ON
Submitted By
“Shaikh Bilal Hafez Abdul Qayyum”
1. INTRODUCTION IN C 1
2. Flowcharting 2
3. Algorithm efficiency 5
4. Header Files 7
5. Statement 9
6. Keyword 10
7. Identifiers 11
8. Decimal number system 13
9. Declaration 15
10. Initialization 16
# INTRODUCTION IN C
C is a procedural programming language initially
developed by Dennis Ritchie in the year 1972.at Bell
Laboratories of AT&T Labs. It was mainly developed as a
system programming language to write the UNIX
operating system.
#ALOGORITHAM
The word Algorithm means” A set of finite rules or
instructions to be followed in calculations or other
problem-solving operations”
Or
Page 1
Flow
charting
1)Terminator :-
3)DLECISION :-
4)connector :-
connector
Data:-
Data is used input or output (I/O) for a process.
Input / Output
Notion of algorithm :-
- Notion means idea concept.
- A set of initial data that abstarads rods
of the solving problem
Algo
rithm efficiency
- Worst – case, best case, Average case.
- Algorithm efficiency depends on the input size n.
- Some algorithm efficiency depends on type of
input.
- Worst – case efficiency:-
[Number of times the basic operation will be
executed] for the best case input of size n.
Algorithmic problem:-
Algorithm to add two numbers entered users.
Step 1:- Start.
Step 2:- Declare variables A, B&C.
Step 3:- Read value A&B
Step 4:- Add A and B and assign
the result to sum
c= a+b
Step 5:- Display C.
Step 6:-Stop.
1. Header Files:
Header file library that lets us work with input and output
function such as Print f
Header files should be included in program first
Page 7
2. Void Main ( )
3. Variable Declaration:
1. Statement:
All executable statements should come after the
declarations of variables
#Token
The language code is formed of the combination of
character set.
A token in a is sequence of characters that
represents specific element in a c program
1 .Keyword:
Keyword are nothing but system defined identifiers
key words are reserved words of the language
They have specific meaning in the language and
Cannot be used by the programmer as variable or
constant name
The C language specifics 32 keywords and other
reserved words keywords are listed as below
Auto if return Continue case
const new else long struct
static char break while struct
int double goto for unsigned
float void switch do Size of
default enum register extern union
volatile floath
Example:-
Else is keyword so it cannot be used as else
Or else it must be used as else.
Identifiers:-
Identifiers are names that are used to identify element in a
program such as variables, function and labels
An identifiers can be composed of letters such as
uppercase, lowercase letters underscore, digits.
Page 11
Constant
Types of Canstant
1. number/ointeger Constant
2 .Character constant
3 .string constant.
Page 12
Page 13
octal number
Declaration
int a;
Float b:
Chat J;
Sum;
Initialization:
E-g:-
int c= 5
float a=15;
addition Constant
#include <stdio.ht
int main()
{ int a = 10;
int b= 5;
int sum = atb :
Paint f ("add of two integer % d", Sum);
}
Page 16