C Language_Chapter 2.pdf, Slides of Computer Science

This PDF contains the Chapter 2 slides of C Language, covering the fundamental concepts in a simple and easy-to-understand way. The slides explain important topics with examples, making it easier for students to follow along during study or revision. These slides are very helpful for quick learning, class presentations, and exam preparation.

Typology: Slides

2022/2023

Available from 09/13/2025

yashfa-murtaza
yashfa-murtaza 🇺🇸

3 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
In
stru
c
t
ion
s
The
s
e
a
r
e
st
a
t
emen
ts
in
a
P
r
og
r
am
T
y
pe
s
T
y
pe
Decla
r
a
t
ion
In
stru
c
t
ion
s
Con
tr
ol
In
stru
c
t
ion
s
A
r
i
t
hme
t
ic
In
stru
c
t
ion
s
instructions wo commands hoti hain jo compiler
ko batati hain kya kaam karna hai.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download C Language_Chapter 2.pdf and more Slides Computer Science in PDF only on Docsity!

In stru c t ion s

The s e a r e st a t emen ts in a P r og r am

T y pe s

T y pe Decla r a t ion In stru c t ion s Con tr ol A r i t hme t ic In stru c t ion s In stru c t ion s

In stru c t ion s

T y pe Decla r a t ion In stru c t ion s Decla r e v a r befo r e us ing i t

in t a = 22 ; in t b = a ; in t c = b + 1 ; in t d = 1 , e ;

VALID INVALID

in t a = 22 ; in t b = a ; in t c = b + 2 ; in t d = 2 , e ; in t a , b , c ; a = b = c = 1 ; in t a , b , c = 1 ;

a = b + c

VALID INVALID

b + c = a a = bc a = b ^ c a = b ***** c a = b / c NOTE - po w(x,y) fo r x t o t he po w e r y

A r i t hme t ic In stru c t ion s

Mod u la r Ope r a t o r %

Re tur n s r emainde r fo r in t 3 % 2 = 1

- 3 % 2 = - 1

A r i t hme t ic In stru c t ion s

A r i t hme t ic In stru c t ion s

Ope r a t o r P r ecedence

x = 4 + 9 * 10 x = 4 * 3 / 6 * 2

A r i t hme t ic In stru c t ion s

A ss ocia t i v i ty ( fo r s ame p r ecedence )

Lef t t o Righ t

x = 4 * 3 / 6 * 2

Ope r a t o rs

a. A r i t hme t ic Ope r a t o rs b. Rela t ional Ope r a t o rs d. Bi tw i s e Ope r a t o rs c. Logical Ope r a t o rs e. A ss ignmen t Ope r a t o rs f. Te r na ry Ope r a t o r

Ope r a t o rs

Rela t ional Ope r a t o rs

Ope r a t o r P r ecendence

P r io r i ty

1 2 3 4 5 6 7 8

Ope r a t o r

*! , /, % +, - <, <=, >, >= ==, != && || =

Ope r a t o rs

A ss ignmen t Ope r a t o rs