Professional Documents
Culture Documents
C
Copy and paste the above program in the ,ev C.. editor& save it with e/tension *c& compile& and then
e/ecute the program
Printab&e ,SCII C'aracters
Char
Decimal
code
Description
SP 32 Space
! 33 Exclamation mark
" 34 Quotation mark (" in HTM!
" 3# $ro%% &atc& (num'er %i(n!
) 3* +ollar %i(n
, 3- Percent %i(n
& 3. /mper%an0
1 32 $lo%in( %in(le quote (apo%trop&e!
( 43 4penin( parent&e%e%
! 45 $lo%in( parent&e%e%
6 42 /%teri%k (%tar7 multipl8!
9 43 Plu%
7 44 $omma
: 4# H8p&en7 0a%&7 minu%
; 4* Perio0
< 4- Sla%& (=or>ar0 or 0i?i0e!
3 4. @ero
5 42 4ne
2 #3 T>o
3 #5 T&ree
4 #2 Aour
# #3 Ai?e
* #4 Six
'
- ## Se?en
. #* Ei(&t
2 #- Bine
C #. $olon
; #2 Semicolon
D *3 e%% t&an %i(n (< in HTM!
E *5 Equal% %i(n
F *2 Greater t&an %i(n (&(t; in HTM!
H *3 Que%tion mark
I *4 /t:%i(n
/ *# Jpper ca%e /
K ** Jpper ca%e K
$ *- Jpper ca%e $
+ *. Jpper ca%e +
E *2 Jpper ca%e E
A -3 Jpper ca%e A
G -5 Jpper ca%e G
H -2 Jpper ca%e H
L -3 Jpper ca%e L
M -4 Jpper ca%e M
N -# Jpper ca%e N
-* Jpper ca%e
M -- Jpper ca%e M
B -. Jpper ca%e B
4 -2 Jpper ca%e 4
P .3 Jpper ca%e P
Q .5 Jpper ca%e Q
O .2 Jpper ca%e O
S .3 Jpper ca%e S
T .4 Jpper ca%e T
J .# Jpper ca%e J
%
P .* Jpper ca%e P
Q .- Jpper ca%e Q
R .. Jpper ca%e R
S .2 Jpper ca%e S
@ 23 Jpper ca%e @
T 25 4penin( %quare 'racket
U 22 Kack%la%& (Oe?er%e %lant!
V 23 $lo%in( %quare 'racket
W 24 $aret ($ircum=lex!
X 2# Jn0er%core
1 2* 4penin( %in(le quote
a 2- o>er ca%e a
' 2. o>er ca%e '
c 22 o>er ca%e c
0 533 o>er ca%e 0
e 535 o>er ca%e e
= 532 o>er ca%e =
( 533 o>er ca%e (
& 534 o>er ca%e &
i 53# o>er ca%e i
Y 53* o>er ca%e Y
k 53- o>er ca%e k
l 53. o>er ca%e l
m 532 o>er ca%e m
n 553 o>er ca%e n
o 555 o>er ca%e o
p 552 o>er ca%e p
q 553 o>er ca%e q
r 554 o>er ca%e r
% 55# o>er ca%e %
t 55* o>er ca%e t
4
u 55- o>er ca%e u
? 55. o>er ca%e ?
> 552 o>er ca%e >
x 523 o>er ca%e x
8 525 o>er ca%e 8
Z 522 o>er ca%e Z
[ 523 4penin( curl8 'race
\ 524 Pertical line
] 52# $lo%in( curl8 'race
^ 52* Til0e (approximate!
+E 52- +elete (ru'out!7 cro%%:&atc& 'ox
Laboratory Tas-s:
1* :rite an interactive C program that reads the radius of a circle inscribed inside a
sGuare and based on that it prints the values of red and yellow areas respectively*
5ssume that the radius is in cm*
Print each output value with two digits after the decimal point* ,efine the value of 0'*1%14H1 as a
constant*
5 sample run of your program gives the following:
2* :rite an interactive C program that computes the salary in Saudi Iiyals of a
part-time employee based on :
- number of days wor7ed*
- number of hours per day assuming that he wor7ed the same hours every day*
- the hourly wage*
Choose the right type for each variable* 5 sample run of the program is:
(
3* :rite an interactive C program that reads the two initials of a person 0i*e*& the
starting letters of his first and second names1* $t then prints a message informing
him his age after 4 years* 5 sample run of the program is:
"