0% found this document useful (0 votes)
4 views

C practical file

The document contains a series of C programming snippets demonstrating various programming concepts such as conditional statements, basic arithmetic operations, and array manipulations. It includes examples of input/output operations, function definitions, and handling user data. The overall structure appears to be fragmented and contains numerous typographical errors.

Uploaded by

d27428342
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

C practical file

The document contains a series of C programming snippets demonstrating various programming concepts such as conditional statements, basic arithmetic operations, and array manipulations. It includes examples of input/output operations, function definitions, and handling user data. The overall structure appears to be fragmented and contains numerous typographical errors.

Uploaded by

d27428342
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Roqram to implement Condi tional Biatmots in a

+incude estdao-h>
int main()
nt num,

Sany ("d",A number );


umbr >o ){
Pint(" The umbes is bositie n);
3
elyej (rumber ko)l
pnt " TheThe number
rummber is negative in")i

þin ("The number is Zero.\n");


e t n 0:
Case3.
brtai
uum2); ,numl- Keolt:d ("Re
bak;
nun2)i ,raun)+
("Resulti1.A
(choice) Suith
Ca;se ith
1-4);"); choie( yourpri(Ent
In)i division 4.
liati
n 2-gubtraion
3. \n on
AHditi\n .þint
:n"); operten ("cho
se print
");number psinttr
too
,Choi
j e n2 num, int
enl) unt
<stdio.
h> ncude #
Aiatement
n (ose /ith úntemed
jrum2: o) {

Division tro.\n');
J brtak

þrint (In valid Choie! In");


3 etunn0j
umlement Josing Consta ets

include eStoioh
int main()5

Aagyl"ha",An):

Ito .d:\n", n)i


dorit;izzn ;i*+)

3
to
roram pee basc inpd -outfut opraten
CAanguage
tnclude estioh
int main (){
Char name [5o];
nt
Poat marks;
print ("Entn your name "):
Bta (s', name);
print ("Ente yau age i" );
rint ("enter your masks );
Jan ("",& manks);
prin ("ln---jer Detils--\n");
print "Nhme: s ln",name );

"Mane 2f maks);
5) 1rogrm to implement eser

int add (int, in);


int main0
nt numl nun2 ,1eht;
print ("Enter too reunbe s;");

Jreslt add (numl jnuum2);


brin "Sum = lid In',Jrest ):
1etun O;

uncion
unt add nta,intb 01
neton atbj
to bem ert
+include /Stdioh?

int mainl ){
Lnt nun i
fint("Enten a nember ");
.,tnm);
num <o)
prnfattrial is not ngatie numberl
ele,
ct ial

neton 0;
dactoial lnum);
3
n==olln= =1)
e lie
netwn n* hceiad (n-1);
3
1) PRogm to nylemet One - dimenyonal ay n

angg
+nclue cstioh
int mnin({
Lnt n,
fin 'Entn the number of elemunt in the
ay:"):
An);
unt arn;
"Enten ha element siln';n);
ter lunt iz0;izn;itt);
yd,har1);
print ( The elemend, the aray ot :");
torlint izo; iLni itt
3
retnoi
Troganm o imie ment two- cdimens iomal amrak
Ln

tt ndde stio.h>
int main()
unt Jows, Cos;
aint "een the number rosi");
þriy"ater
'fntkr the number o Colmn'):
Say(/.d", os);
int ar bowg ou];
Porint ("Enten the element matrin: n")
Torl int /=o; /erows ;itt)l
forl int
print (" lemua at Et.d]
d],):
("In the matin is: \n"):

Jorint j-o;ije(Gui jt1)!


rarm to Vuouy On too
pration
dimensional a y in C
Void
unbut matinunt Yos int Gas, int matin
prin ("tn the clement ratrin:

er int izo ;
Jolint j= o;j4ro0s;it+)
print jeCalsijtt)L
(elementh at Lr.a].a]:";
Sayl"d",
JI3
matin LJJ):
Void
cisplay Matrin( int yous jint Col gint matix
printy n the natrin is; w):
i=0; i2Yos;itt)
derlnt j=o ije Colsi jtt){
brin ("d", matrin [JI);

smMatrin (int Yos,nt oiint matin [ro]


o1)
deunt i o; izyrw jit+)
tolint j-oi je tols ij1){
Sum t matin LiJ[I
J
J
netnSum;
Vonid tranaboteatin int rows )int
Cos,t matin
[ows] [eoJint tranahose [ou] ows]
rlint izo ;ierows ; itt)l
Jorlint j-0i jecoljjtt)l
otoam to mlemernt mlhdimerttonol

nt main ()
ent

print (ntr the duitabion


3D ay:");
int oM
adyd),;
prin" Eton the elenet ot
jorlint L=0

doliat jei jyij*)l


jt1)1
pin "ilemt»t at Ltd]
[.dJ[.AJ:";
ianl".a,
The 30 avy;:lr");
eint io}icni it1 )
Block d:\n");
do (int j-oi j'y
ijat2
Jor(int k:0; f2z;k*)4
3

rhun 0j
a) :s",Com rig Conatd Centat ("n brin|
h); lastt l(en Cat str
Castr AtbilCan
,strl); Atr efied Atrcby(
stloo]; þied (har
lo
la" 1. Str2);
Stri));
sting Jst Jengt
:"); Sting 9ets/sh2) er
tend ("EntAt oint
gts
:"): Shing frst(str);
("ntr þriny
[2eo]i Conatstr [2eo],
ct[loc7,St2 Char
main int
2stringh> inclde #
eStdio
h> incuude #
anihulatan 3string omhitmcat anguge Poegra ")
to
sh:s",
-1) string funo J1e
dirst Reversud ("ln foiny
);
(Shr Atyer
rater."
): sing
is
else
to inble ment Atuclwe in c larguag
t nclude ec{dieh?
Atucttuolet
Char nome Cho];
nt ro lLno;
Jat marksi

unt maiun 0
et Studont s);
priny ("Ente r Shdent de taidi?n");
prin ("Nune ");
Atuny ssrame);
Prin "Re tl number! ");
1. d",,L.orell. no);
Manks; ");
8S1.mads);

ointnshudent Injemation :\n");


prin"Nhne; /.s n" ,Sl-name );
number:d ",S. o|l-no.)i
to imhlomert unu on n

2stdio h

Char name [so]


Jnt id

unt man()
union

Nan (".d",enpidl;

inlhf atr Emalye Name ;");


emb Name )
Name :l. \"

"n fina value in Uhion; h;


pointD: 1.a lont*d dr to ZAed memaye"
Faint"Nnme is (oupled cuc to Ahored memy
handig opoakim
angge

Char name so]


unt

fle =fohen ("dattx+" "

Jrhnl;
oleniy le n"):
your name. ;"):
Stany" s", rome );

frtos (Ale ); ,name, je)


"\n Dat writn ucees
fle fohn" dat tat",");
fle NULL){

Jlen);
Char Jine [ee];
while

Jine );

fllose (ile);
e,(hhis; ("):
lloo,3o faty out
tent
4o) o36 (?oo,2r ellipse
o,5o); lise 15o, Civele
Circk. Drawa
neng 1Drawa
loo); 2eo, loo, loe, (ine
I|ra
line
8ocs\l
G(¬ uni tgreph
(
mode mphicshics tiaie Iri I1
int
CO
main int
LCerio-h inchde +
ghhica.
h> *inclucle
Cin
Proqman
to

You might also like