MSP
MSP
POLYTECHNIC BEED
MICRO PROJECT ON
Submitted By
“Garad Avinash Sakharam”
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
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
#Algorithm 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.
GENERAL STRUCTURE
OF C PROGRAM
Header file
Void main ()
{
Variable declaration
Statements
}
1. Header Files:
C program requires use of some library function. Which
are included in some header files
When a c. program is using some library function we have
to include the header file
Header file library that lets us work with input and output
function such as Print f
Header files should be included in program first
2. Void Main ( )
3. Variable Declaration:
#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
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.
#Constant
A Constant is Valve Corn not an identinfiro whose value
cannot be change thorough a axecution of the program.
Types of Canstant
1. number/ointeger Constant
2 .Character constant
3 .string constant.
Octal Number
- an octal integer constant can consist of an combination of
digital taken from the set through 7
- But the digits must be o (zero), in order to identify the
constant as an Octal number
- Base 8 number often known as octal number eight
separate digits 0,1,2,3,4 5.6, and 7
- Valid Octal number constants are
02, 045, 076, 012
Hexadecimal number
- A hexadecimal integer constant must beging with either ox
of ox
- it can then be followed by and combination of digit taken
from the sets O through a and a through f
- 0.1.2.3.4.5.6.7.8.9. A.B.C.D.E.F
- Valid hexadecimal integer constant are OX. Ox2o ох2заb
Declaration
- Before a program is written the able reclined in a program
are to be declared with considering that value they may
contain
- all variables must be declared before they can he used in a
program
- a declaration consists of a data type followed by variable
name, ending with a semicolon
- consider the statement below.
int a;
Float b:
Chat J;
Sum;
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);
}