Lecture 1-Introduction to C
Lecture 1-Introduction to C
-Crogramning
Date
"Xe
olp
SCa¢en
Des BoX
Visua studio
Code Blocks
Header Eiles -
has umexious Jibaaxes that
C language-defined functions to make
inclucle prec
easieI
psngrammninq
languaqe ,headefile s Contains the Set
To C ibaay funcoos.
of pre-defined standazd
Page .
Date
Ktime.b peatem
handing
date ( functioos,
time O
Telated to
Basic program
Structuze
# inc ude <
studio.h
include < conioh
Void maio ()
printf\welcame »)
qeth O;
Statement oo
piotf0- uSed to print
Console
coe(an use ( L as be loc)
int
flogt - f
pointf (0 klelcome");
Value of oumbez
pintf ("
Syntax :
a - NO.
S t o e s value
of input
Data
on Deo line
used to priot olp
-
print Space
used to priot betuees
too Values.
-Multiple lioe
inc Comment-=+|
Data-typcs.
Primitive Void Dezivec Enumeatfon
int
flogt Arnay
chaz strings
Structuxe
Jong unlon
double
insigned
Signech
Void main )
Constant i
# defoe pTeppceSSoY
2. using Const keyuoozd
defioe LENTH l0
cq’ de fineITH 5
Date
caps voidmain ()
aca WTDTH
LENTH *
areq=
printf Valu aTeas
getch ();
Data-types
Bytes
datatypes
Short iot 2 Range
-32,768 ta 2 6
unsigne shosl in+
uDsíqnrd iot oto ,294S(1,25
T2147A23,64 tu
Iengint
unsigoedlong int to 42.GL,361,293
long iog int -2^63 to(243
Signed chaz
unsigned chaz -)231to27
float Oto 255
double 4
long double
+iioclude x stdioh
Vord naio O
int a =|0 ;
cha b-ls';
floqt C=288 ,
double d 28.8883
pf("In Thteqer value - %cl');
b);
pf("lnchaaactex
pf flbat yalue
\nfloat Value -%{,c)3
pf (" o doubie float Value fd);