0% found this document useful (0 votes)
22 views

C Programming Notes

1. The document describes several algorithms and their steps to calculate the sum of two numbers, find the area of a triangle, calculate the roots of a quadratic equation, and calculate the simple interest. 2. It also discusses some basic concepts in programming like variables, data types, constants, functions, conditional statements, and loops. 3. Key terms defined include variables, constants, data types like integer, float, character, and their sizes and value ranges in memory. Functions, if/else conditional statements and loops are introduced as basic programming constructs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

C Programming Notes

1. The document describes several algorithms and their steps to calculate the sum of two numbers, find the area of a triangle, calculate the roots of a quadratic equation, and calculate the simple interest. 2. It also discusses some basic concepts in programming like variables, data types, constants, functions, conditional statements, and loops. 3. Key terms defined include variables, constants, data types like integer, float, character, and their sizes and value ranges in memory. Functions, if/else conditional statements and loops are introduced as basic programming constructs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Shold

Page
No.
Date o wser a'YdeAdisplay
at
algozitha
sBeps
offox cirele om
(o
of coe
any
ALGORITHI
ilaoithm axea /Loput
Oriiag
Bedoe
pobem
Set
a
outeut Oulipieaionad adius
-2 5ubtyacton to
1=d)
yision Expected odius Sdepyiziat
G
output a-cea
is taddition
algoathm
ond Algoxidhm
ond
AonchotAloczithm input taxt
1:Step
take Eod
Step5
Opexadasá ingt
&Sumbols: Expected
Lbite 2
step
dhe
K
Page No.
Page No.
Date
Date

Wite aleathen to find Sun at tuo


aumbeys 4ate. algozithm ofod aea d beiagle using Sides
stazt
Exeected inout tuo nas DTake input ie Sides ct txiongle c Rzom ae Ca,b, c)
Expected outeut Sum tuons (2 92 iilSemi pexineBex (s)2 atbtC/2
iwsrs-a)*CS-5)*cs-)
Step I Stat N) iot A
step 2a take iapt (xom wie)
step A<- 2ty
Mloochot
Gtep 5: Eod
Taput Lautput
3Wte algoxidhn to ad dhe xoots of quodatic
equotioa
-opetation pocesiag
Expected input Nalue a, 6te
Expected output Roots e quadatic eouathon' Coonectox
Stepl Stat Condi tonaontolLAow
GtepsiEatey waues a, b hc
Lstepsi Cal Culate Touts d QuadzoHe equaton
K-B1-40c2&a
Step 43 ok-b--40een
ococonnectbn
Step5 .Poiat outeut Cx, r)
Stepl End Stot Ead
Puge Na.
Date Page No.
Oate

6a a auacho xt to caleulote the Soua xe c Thee Constaucts o agaxithm oad Aouschot


Sequence
Gelertion
3)Tatexoioa
S20ence!:
Sinply paxlmig Step aey he odhex
ldisplay value fy
to sex

Eod

alzo n fous chat to calcalate she Simple interest

Tt ls USed dox making he decieion, 5clection is used


toxe yalue Å piociple (P) ia 1f. elseif then etvotuel

Yes not eligb)e


EUgible
Looping ITatesotio
cxcutel
iatucton my
Dete

Date

Names dhat axe Qisen to


Constact notics Clase ptechims Suah e akles,
Kules o Consturiog ideati'ex
Synhal
chse Hash

RIt is Cose Senshve


They adc Cos SensiNe

studet
Studet
Noid Gudeat cat ideatica
Notional staada STudertJ bet idette
Yold bxenk Constots
doutle Volasle Caie do
zehg Ssoitoh zhile ahar ttnst Contone Cons tontt
plse
Tategex Costant
Rnles) t must+ have tenst cne dig
include <siahy hege i) st shad oat hoNe o decimalpoiat
incine <Cooie ht co

sthe Constant
CHscY

2dehcs
age No.
Page No.
Date
Date

Naodoble
t is an entiy chat may choage
Te nnge depenson Conpile

Rea Conelart They asce used fox declaxing the soxiable Data sype
Poaingpoit Canstont deaides sthe sige allacated fox
\Maoble

Foaptioal Foxm (EE) Expoeatia) Foxm (E) Tüpes d daBasypa


Rule)Must have atlenst diat ainoyDalaypes
M ust hove decinal paint Usey da de.fine datatypes
Deied datatyaa

atage e) double dlchatacBex


montisSQ CxpoAent
Tategex data sype Ciat)
egi 15, -25
4 the pact oloaimg memoyyt -2 toI
Rart appearieg hele the es montss
le is calsd ecponent e -3162 to3216

chaxac'ex Constast Aloat


ztis a Ciaae dphatotSingle digt ox Speain Syabel eaclases
i a Shgle iavrted Commos k bosth he invezte Comaa
34e -38 to gs43 1323>
392l345A12954z
egi-
angee-aaz
to
oto
255
A
Qdahle
Chax
intlengge Memei Shot
Lhyteiategex uasigacd
itge lenen
2byte
iategexi
Signed dasigned
chaxactez Shortsigned
lang uasigaed hetc
Menanyi
Signcdickaock
angete to-92167
-2162 ce
--03-127to
-128
-97 to
Lhyte

Can
3:4e".393t
Tangei deubllange
ate

)icBudes
stdia h
?
yetusa
Statemeatay maiaiat
Statemente
Statementydeclatian/dekinataa Noid Sototemene moiei()
nd
kloaiah)
ipalude
eprgranmigiSyatax
Bosie
Statemest ia
maincl (WELCoE
end

maia To
Stat PCe)

Date PageNo.
gebchCy
85S oat
(a) usex rom Nalue integey take
Char %e2 ()main vaid
oat 1. de<coaia.h> inclu
Statosh)iacude<
Condgins stieg Control ideest siaple Calcalato
the
Conalstdrg" SConf
Suatay
Canfc) S
etoxn 46AoatQ
malo Noid
Sphée (Nola poziat KCanio
hz include
<Sthdia
h) oclude
Charache
ieg pziahiag d
value stag foznat
C)main Meid
LCoaioh incude
<Stia-h incude
Date
No. Page Date
Cuge No.
Date Page No.
Date

Totahe a vondoble rom the seY Lpexfouacde


includesstdln hy
ncludekstdinh ncluded Conio:b}
ioclude &coaio: h

int a,btempi
LalYser)

+e mpa
print
hetemp
Qetche
the voue ct Cone
iacude K5tdioh Rogan to Suo tatthot the pog twithout
incude &Cono h
od maìnl indude<stdio -h)
incluode <Conio h2
Noid moinl
Anat
clYSCxC
Print CEatey dhe Nolue f k h =" )!
psint Ç Estex alue tak ")
porin CNolune Cone is .

Jtolume qetchl)
Q:aab2shest eat Date Page No.
Date

Assiament opexataz
adoteme Shoxtcut
additiua

mpicatia
madulo (yemiodel
vaue (5xË- 2) value (5 j2)+delta
include kConin hy Nalue (5Ë-2)delta
Void maia Cl
operatax
ml
egm=+L
his operaox Substack one to the opeand
pcint e
using the oziginal walue Lthen Voialr is iacsemes

<2 less haa


mz m +l

equal to equala
phen pe fiy ia ued in erpression yoriable N
faigmetpeabz ncYeme ted < decemenhed f then erpresea s
ealucted ing nen al e od aable
Puge No.
Date Page No.
Date

Conditioaal opexatox

sto toclude <sldia h


include kconioh)

byte dhe operond occupie The operond ay be erint Centex the deoo Aum hex")
dataye
4)itepraganpind the sige d each data y
4include <stdioah)
inolude kConich
Logical
pxiatfCige ol chax data ype shdSige atohay
Logiaal4 C)
lpxint Cla Si_e dSead datatpe dsige d Shandy
print nsiged loag data hpe ,Sige d [angly
dch
Not
Date Page No.
Date

is used toeambiae he multple eSultlCaz6)


gical apexatos

locludekatdia. hy.
incude /Coaiohy

teSut Ca=b)
piat Valåe yeult is yodesut)
esult = Cas ab) lL(c<t)
pzind

pre pro CeAseTI. t istuot he cCompilex to do


mequiredseprocesS ieg hefaxe she actual Compile
Stet
pre proCeAsex Stot uith t nc 'on
uGing tarAyoperatx eg iaclude
incude Kconio hY #dene
inclu cdc <stdie hy

nresut Caz=b) Cceh)y


Date Date

oPeroste

Result is ahen Coxelpeadiog bik 2 oeeanb


opposse

Bitoseopeatg sthe bt level (o)


apans
12A 2S
shift a: Ghe his Hoiorcs the by Contain

6
12 66
6 ooololoto
272

Co01tool

\ol olololo)ol
Date
Page No.
Date

incude <Stdiph Anclude GhdioAy


iaclude Conia h) &aclude Kconibshy
Noid man)

LclxscC

pni(igh Shift %d", a ) )include 4s+dio h


gchchi include<Coaioh

aetch C)
Snallex) is
r"y piat
moA yoid
atey StoBement
Check
hlack else Stademes2;
else
statemtlCondi
tan if
Syalak
cCondiHaa) if
else iP Statement
Decisiao
2|
statonent cofContvol 28|8|9
Dute
No. u¡e
Datt
uge No.
Date Puge No.
Date

plse
is add
the given Aa
6tatemernt alocK 3
iocude <stdigh)
jnclude AConiahy

dest nested
tnt n
Gedy
ot
Body of
- :fCn%e22 6) else Oedy of
ABted

else

(End

3) Aesled if pzagram to fnd he Iaged


Syntak
include kStdiohy
include <Conioh

Staement hlack

Stodemes hlocK 2.,


Puge No.

pase Date

pragom o dhe electic


dlsiikudad Conpanyt
Campany Chay-ci ox dome
Chage Suoitch Gtote met
Saitch Cexp)

Gtate ment
hxealk;
Coc Constoat 2
+hude 4stdioh Statement e
nclude <caabuh
Moid man C)
Stadc mert a
Lint Cao Vnit)
Loefaut
clsscYC) Statc meaty
priat ( Entex custo mkx o uni")

biil= o5o x uai k


else if (unid casoo)
bil) =1oo + lunits- 200) *6.6S

Ll 23 ot Cunitr 6o6)YO. 85
else ClrSor
Scan"d",
Suoltch Ca)
ka),
pria bil paid hy Cus tomex bi)
Co e!
print FC ond);
Puge No
Dute

Qcint (^ toc) pint P(nf Cid c)


break beak
ldefout
pei thoee) prit f (^iovalid selectioa)
delaut
getch)
prtCiavaud sdecdien

addidion,
eite a n f g a a te pesctoy n
me
basean the e Choise
alipication dis ten

Neid Maiat)

lcxscci
ezid CEde the value a n
SoitchEACop
GACoe
brealk
heak
Caie

You might also like