The document discusses various types of constants and variables in programming, including primary constants like integers and floating-point numbers, as well as character constants. It also covers the importance of declaring variables and the different data types, such as integer, float, and char, along with their properties. Additionally, it explains operators used in programming, including arithmetic, relational, logical, and bitwise operators.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
6 views7 pages
Pps Lesson LL
The document discusses various types of constants and variables in programming, including primary constants like integers and floating-point numbers, as well as character constants. It also covers the importance of declaring variables and the different data types, such as integer, float, and char, along with their properties. Additionally, it explains operators used in programming, including arithmetic, relational, logical, and bitwise operators.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 7
‘pevine the Ferm Constant inc: Explain the b1pe oF cons
Primary congtan
\) Inteqer constant, whole number Without decimal
Ces 55,-12) _
[ > Real (%) Floating point constant: vsedtor Number
with decimal Ceg 22-45, -206.67)-
> Exponential form: Used Br extremely lege
(7) smal) value.
Ceo 7-Se2 ,-s-20H )
wry character constant: A single characte enclosed
with A single quotes.
| Cr ee
uy) Seeoundary con stant:
Array, pointer, Structure, U
O) |wnat ave identiPier 7 Enlieh the vale for vaild idenbfier wl
| example.
Noviables are memory locahon Whose value con be change
[ Auring exeeuHon
estD Types of vaviavle +
YS Integer veriable: stores whole number.
Cint m= 5-5)
™ Plating vanable: stares
CPloat y=us 5)
decimal number
> chavachey variable: stores single chavacher.
C char ch= "A? 3)
my Rules for variables
3) start with an alpha bet
2D under scorvec-) is allowed ,bub no spaces, commas, special symbols.
“yy shovlb be meaningful and concise-
1 Must not be a keyword:
OJ Write short note on data types inc.
> > pata types specify tne type of data q variable can be held . The
are class}fied into»
D Primary peta types: Int, Float, char.
perved pata types: Arrays, function, painter:
™D yser- defined data types: structure union ete
NY Ovimary data tupes and Their paoperties-
Data type Frmat speci fien size (Bytes)
jot “haf a
long ink
Pieat
double
Char he 4
tong
double2569. (eee is
| ris
—_|") Ale +o above toble:
yy SAGESILKARAING! ORCHID COLLEGE OF ENGINEERING & TECHINOLOGY SOLAPUR
) Inteqer type can be Signed Gry Unsigned.
“nd Floating type «dove decimal Values with prec
wy character type Cehar) stores single character.
necceatty oF
< of declarakion in G psoqramming)
—>| > ve “Tyee of declaration Specifies tne dato duce of
Navable before use: Z
AD LocaHen: pust be declavated at the veqinniq of
= the preqvam-
op purpose: eles the compiler allocate memory correchy
wm Ex ink sum 5 I Integer type C2 bytes)
a Pioat average; qy Floating type C uby tes)
e a char genders 1 character type C1bY) ‘
OJ [enlist al operator used inc programming 7
=>
1) Ae opezater is a symbol that pesforms an operation on
one tor) two oprends operands Cwaluer)-
ha) “Tures of Opreator ince
> Arithmetic opreatom + perform mathe matical operation
Meaning ex. |
ate
a-b
Deeb
alo
atleb_ \ Aneroter:
jues
> Getational operator + Compare NO
srao. | opreator Peaaing
, < Greoler
han
1 Enampe ]
2 Jess
' han
- — Greater
than | |
equal |
a ae |
5 > jess than
equal to |
She a che. _ | _____}
aezb
' Equal to |
m) Logical operate! To perform logica) opesation,
Y Their ave B~ ay pet oF logical op reator
> Aegicol aed AND CER: TE all walues ave trac
output is true:
oprand 2 result]
aprend 4
aa)
NAGESHRARMIAG! ORCHID COLLEGE OF ENGINEERING & TECHNOLOGY, SOLAPUR
» Logical oR Cn) Tf Fany one of Ame value is tage
yhen ourput wit be faut
rornd T oprand 9 —
A 7 | an
af
0
°
YT oprend 4 ub put
os | 4 | o E : a
_|[ eo 1
— Ww) Assignment operator: Assign walues- -
Sr no. | Operator Operation Meaning -
1 = a=6 a assign Fea
a at=b = ath
Ee 3 -s q-=b aza-b
a [ ve ax= 6 a=axb
= 2 aye. aza/b
é ath = a"e=b a= a*fob
uv) Unary Operator : oprates on single _oprand.
Unary minus: - — ~
This opreater has an efFect of neqating
a prrtular value and a new number fe printed.
_ 89 Wwe GY):ea oak
} operator:
W Ineremen
has the
a) The operator
enrting dhe present value
effect of increasing cor) | nerearn ~
by i.
eg att dh erat)
nN) They ax further classified into a-t4pes! :
1) prefixed increament operator C++ad: Here Siest De inerer
ment js performed and then operation: £3; oe
n> pest fixed increament operator Cate): Hert inst op
and then increamemt
tion
is performe
i) Deereament Operator:
has dhe effect of deeveasing (97) decreament
) This operator
by g-
4) They ave further classified into 2-types®
\ refined decreament operator C--a) +
ic perfirmed and dren operation
n> postfixed decreament operator C4) * Here First operalion ore
perfirmed and then decreamenh
wy conditione} Operator: Temnary op erator for cond based result-
Genre} form
Expri? Expra2: Expra ;
ae
Here First the decreanm
vid comma Operator: Evalutes multiple expression
Yin Bitwise Opevator: work at the vinary level,
Their are = subtypes of bitwise operator «
» Bitwise ANDCEM): The AND operator causes bit ~by~ bit
AND between ts hoo oprands
canaelely | ARRUaI eT
a s
N 2
xahy °}
AGESH KARUAGE ORCHSO COLLEGE OF ENGINEERING & TECHNOLOGY, SOLAPUR
ny Bitwise ORCI): Tt per form pit-by-~ bid Comparison
2 of its 9 aprands and the resuit
fof OR comparison is determined by following tabl<
Binary “pattern |
ew Bit)
variadle | ~ value
- -_ ~ | ete)
“ — 4 4 —_—
> vy Bitwis xclusive oR (xoR) (%): This opreator peProm
bit—by —bit Comparison of its two operand.
| [ Nariable [value Binary pattern)
- {2 | = 019)
a oo010
ae a oN) L a :
—_@._| what is aifference bet? = and == operator?
=e operator
Tris an eela Hon af
operator»
Eris ased to comparing
operator
ay] Fr is an assignment y
value to avaniable. Hoo values
| Constand term can't be i) @nstan + term placed on
las:
Pleceol on LHS: