C Programming: Understanding Variables, Data Types, Keywords, and Program Structure, High school final essays of Computer science

An introduction to the fundamental concepts of C programming, including variables, data types, constants, keywords, and program structure. Learn about the rules for naming variables, different data types, and the meaning of various keywords. Discover the basics of writing a C program with the help of examples.

Typology: High school final essays

2019/2020

Uploaded on 07/09/2022

fatima-yar-khan
fatima-yar-khan 🇮🇳

2 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Va
r
iable
s
Va
r
iable
i
s
t
he
name
of
a
memo
ry
loca
t
ion
w
hich
st
o
r
e
s
s
ome
da
t
a
.
25
S
ab
Memo
ry
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download C Programming: Understanding Variables, Data Types, Keywords, and Program Structure and more High school final essays Computer science in PDF only on Docsity!

Va r iable s

Va r iable i s t he name of a memo ry loca t ion w hich st o r e s s ome da t a. 25 S a b Memo ry

Va r iable s

R u le s a. Va r iable s a r e ca s e s en s i t i v e b. 1st cha r ac t e r i s alphabe t o r '_' c. no comma / blank s pace d. No o t he r sy mbol o t he r t han '_'

Con st an ts

Val u e s t ha t don 't change ( fi x ed ) T y pe s In t ege r Con st an ts Cha r ac t e r Real Con st an ts Con st an **ts 1 , 2 , 3 , 0 , - 1 , - 2

  1. 0 , 2. 0 ,
  2. 14 , - 24 '** a ', ' b ', ' A ', '#', '&'

32 Ke yw o r d s in C

Ke yw o r d s

Re s e rv ed w o r d s t ha t ha v e s pecial meaning t o t he compile r

P r og r am S tru c tur e

#include<stdio.h> int main() { printf("Hello World"); return 0 ; }

Commen ts

Single Line M u l t iple Line Line s t ha t a r e no t pa rt of p r og r am // / /

O ut p ut

p r in t f (" age i s % d ", age ); p r in t f (" v al u e of pi i s % f ", pi ); p r in t f (" st a r look s like t hi s % c ", st a r);

CASES

1. in t ege **rs

  1. r** eal n u mbe rs 3. cha r ac t e rs

Inp ut

s canf (" % d ", & age );