You are on page 1of 11

6/25/12 C-Lab-Assignment-1

1/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
Scribd
Upload
Search books, presentations, business, academics... Search
Explore
Documents
Books - Fiction
Books - Non-fiction
Health & Medicine
Brochures/Catalogs
Government Docs
How-To Guides/Manuals
Magazines/Newspapers
Recipes/Menus
School Work
+ all categories
Featured
Recent
People
Authors
Students
Researchers
Publishers
Government & Nonprofits
Businesses
Musicians
Artists & Designers
Teachers
+ all categories
Most Followed
Popular
Sign Up
|
Log In
6/25/12 C-Lab-Assignment-1
2/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
Java
What Language Do You Think In? Download The Azure Free Trial Today
windowsazure.com

MCA-I(LabAssignments)
Sub:(610002)ProgrammingSkillsI(FOP)
(13) Write a C Program to accept any character from user and
displayitsASCIInumberonscreen.
(14) Write a C Program to input any ASCII number and display
appropriatecharacteronscreen.
(15)WriteaCProgramtofindareaofarectangle(Hint:A=l*b)
(16)WriteaCProgramtofindareaofatriangle(Hint:A=*h*b)
(17)WriteaCProgramtoinputanyCapitalletteranddisplayit
withsmallletter.
(18)WriteaCProgramtoinputanySmallletteranddisplayitwith
capitalletter.
6/25/12 C-Lab-Assignment-1
3/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
(19)WriteaCProgramtoinputthreedigitsnumberfromuserand
calculatesumoffirstandlastnumbers.
(Hint:I/p: 5 O/p:11)
(20)WriteaCProgramtoinputthreedigitsnumberfromuserand
displaysquareoffirstandlastnumbers.
(Hint:I/p:358 O/p:Squareof3is9 andSquareof8is64)
(21) Write a C Program to convert Celsius value into Fahrenheit
value. (Formula:F=
32
5
9
+
C
)
(22) Write a C Program to convert Fahrenheit value into Celsius
value.
(23)WriteaCProgramtoinputyourbirthday,monthandyearin
numericformatanddisplaytotaldaysasaoutput.
(24)WriteaCProgramtoinputtwodigitsnumberfromuserand
displaywithreversenumberonscreen(Hint:I/P:32 O/P:23)
Page2of10 Preparedby:AshwinDobariya

MCA-I(LabAssignments)
Sub:(610002)ProgrammingSkillsI(FOP)

(1) Write a C Program to display greater number from two
numbers.
(2) WriteaCProgramtoinputprice,quantityofanitemfromuser
anddisplayfinalpaymentaccordingtofollowingcondition.
a. Iftotalpurchaseisgreaterthan1000Rs.thencalculate
discount15%otherwisecalculate10%oftotalrs.
(3)
Write a C Program to accept marks of all the subjects and
displaytotalmarks,percentageandresultwhetherthestudent
ispassorfail.(Passingmarkis40)
(4) Write a C Program to accepts marks of all the subjects and
display total marks, percentage, class and result whether the
studentispassorfail.(Passingmarkis40).
(5) WriteaCProgramtocheckwhethertheenteryearisleapyear
6/25/12 C-Lab-Assignment-1
4/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
ornot.
(6) Writea CProgramtocheckwhethertheenternumberis odd
oreven.
(7) Write a C Program to input two number from keyboard and
checkwhetherthefirstnumberisdivisiblebysecondnumber.
(8) WriteraCProgramtoenteranycharacterfromuserandifthat
character is capital letter then display it with small letter on
screenandifentercharacterissmallletterthendisplaywith
Capitalletter.
(9) WriteaCProgramtoinputanyvaluefromuserandcheckthat
the enter value is Capital letter, Small letter, digit or special
symbol.
Page3of10 Preparedby:AshwinDobariya

MCA-I(LabAssignments)
Sub:(610002)ProgrammingSkillsI(FOP)
(10) Write a C Program to display greatest number from three
numbers.
(11) WriteaCProgramtoinputdayinnumberanddisplayintext
format(Hint:I/P:1 O/P:Monday)
(12) WriteaCProgramtoinputmonthinnumberanddisplayintext
format(Hint:I/P:1 O/P:January)
(13) write a C program to check whether the given number is
positive,negativeorzero?
(14) WriteaCProgramtoreadanysinglecharacterfromuserand
check whether that character is number or not using conditional
operator.
(15) Write a C Program to display smallest number from three
numbers.
(16) Write a C Program to display highest number from three
numbersusingANDlogicaloperator.
4
of 10
6/25/12 C-Lab-Assignment-1
5/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
numbersusingANDlogicaloperator.
(17)
WriteaCProgramtoread anycharacterfromuserandcheck
whether that character is vowel or not. using conditional operator.
(a,e,i,o,ucharacterarecalledvowel)
Page4of10 Preparedby:AshwinDobariya

MCA-I(LabAssignments)
Sub:(610002)ProgrammingSkillsI(FOP)

(1) WriteaCProgramtoinputmonthnumberandprintitinatext
formatusingswitchcasestatement.
(2) WriteaCProgramtoinputanycharacterandcheck whether
entercharacterisvowelorconsonant.
(3) Write a C Program to input two numbers and mathematical
operator from user and perform operation on enter numbers
accordingtooperatorusingswitchcasestatement.(Operator
like:+ , - ,*,/ ,%
(Thistypeofprogramisalsocalledmenudrivenprogram.)
(4)
WriteaCProgramtoinputonlysinglenumberfrom1to10
from user and check whether number is odd or even using
switchcasestatement.
(5) Write a C Program to input your subject code and display
subjectnameonscreenusingswitchcasestatement.
(Hint:I/p:103 O/p:ProgramminginC)

(1) Write a C Program to print first 10 natural number with its
squareandcube.
(2) W.A.P.tofindoutfactorialvalueofgivennumber.
(3) W.A.P.toaccepttwointegernumbersfromuserandcalculate
itspowervalue.[e.g.Inputxandyanddisplayanswerofx
y
]
6/25/12 C-Lab-Assignment-1
6/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
itspowervalue.[e.g.Inputxandyanddisplayanswerofx
y
]
(4) W.A.P.todisplaysumoffirsttennumbers.
(5) W.A.P. to accept 10 numbers from user one by one and
displaysitstotalvalueonscreen.
(6) WAPtogenerateArmstrongseriesuptouserchoice.
(7) WAPtogenerate seriesuptouserchoice.
(8) WAPtoacceptnumberfromuserandprintitinreverseorder.
(9) WAPtoinputanynumberfromuserandcheckwhetherthat
numberispalindromeornot.
Page5of10 Preparedby:AshwinDobariya

MCA-I(LabAssignments)
Sub:(610002)ProgrammingSkillsI(FOP)
(11)WAPtoinputanynumberfromuseranddisplaysthetotalof
itsdigits(e.g.I/p:321 o/p:6)
(12)WAPtoinputanynumberfromuserandcheckwhetherthat
numberisArmstrongnumberornot.
WriteaCProgramtodisplayfollowingdifferenttriangle.

(1) (2) (3) (4)
(5) (6)


(7) (8)
1 1 2 3 4 5
1 2 1 2 3 4
1 2 3 1 2 3
*
* *
* * *
* * * *
* * * * *

*
* *
*
* *
* * *
* * * *
* * * * *

6/25/12 C-Lab-Assignment-1
7/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
1 2 3 1 2 3
1 2 3 4 1 2
1 2 3 4 5 1
Page6of10 Preparedby:AshwinDobariya

MCA-I(LabAssignments)
Sub:(610002)ProgrammingSkillsI(FOP)
(9) (10)
1 5 5 5 5 5
2 2 4 4 4 4
3 3 3 3 3 3
4 4 4 4 2 2
5 5 5 5 5 1
(11)

(12)
A A B C D E
A B A B C D
A B C A B C
A B C D A B
A B C D E A
(13) (14)FloydTriangle
1 1
0 1 2 3
1 0 1 4 5 6
0 1 0 1 7 8 9 10
1 0 1 0 1 11 12 13 14 15
6/25/12 C-Lab-Assignment-1
8/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
Page7of10 Preparedby:AshwinDobariya
6/25/12 C-Lab-Assignment-1
9/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
6/25/12 C-Lab-Assignment-1
10/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
Leave a Comment
chile healthcare provider
we are dedicated to saving lives and making the world a better place
www.chilehealthcareproviders.com
6/25/12 C-Lab-Assignment-1
11/11 www.scribd.com/doc/23588262/C-Lab-Assignment-1
You must be logged in to leave a comment.
Submit
Characters: 400
You must be logged in to leave a comment.
Submit
Characters: ...
Upload
Search books, presentations, business, academics... Search
Follow Us!
scribd.com/scribd
twitter.com/scribd
facebook.com/scribd
About
Press
Blog
Partners
Scribd 101
Web Stuff
Support
FAQ
Developers / API
Jobs
Terms
Copyright
Privacy
Copyright 2012 Scribd Inc.
Language:
English

You might also like