Question Paper C Language
Question Paper C Language
Question Paper C Language
: ________
Enrolment No.______________
Subject Code:3310701
Subject Name: Computer Programming
Time:02:30 PM TO 05:00 PM
Instructions:
1.
2.
3.
4.
5.
6.
Attemptallquestions.
MakeSuitableassumptionswherevernecessary.
Figurestotherightindicatefullmarks.
Useofprogrammable&Communicationaidsarestrictlyprohibited.
UseofonlysimplecalculatorispermittedinMathematics.
Englishversionisauthentic.
Q.1
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Q.2
(a)
(a)
(b)
(b)
(c)
(c)
(d)
Answeranysevenoutoften.
Defineflowchartandalgorithm.
StateanyfouradvantagesofClanguage.
Distinguishbetweenconstantsandvariables.
Describescanf()statementinClanguage.
ListbitwiseoperatorsinClanguage.
Differentiatebetweenbreakandcontinuestatement.
WritesyntaxofforloopinClanguage.
DescribeternaryoperatorinClanguage.
Definearray.Showhowtodeclaresingledimensionalarray.
Stateanyfourcharacteristicsofanarray.
Drawandexplainsymbolsofflowchart.
OR
Writelimitationsofflowchart.
Drawflowcharttofindwhethergivennumberisoddoreven.
OR
Writeanalgorithmtocalculateareaofarectangle.
DrawandexplaingeneralstructureofCprograms.
OR
ExplainprimarydatatypesofClanguage.
Finderrorsinfollowings:
(1)Intx;(2)floatx=10;(3)longcharb;(4)#definePI=3.14
OR
(d) Statewhyfollowingareinvalidvariablenames:
(1)1total(2)finalresult(3)count$(4)goto
14
03
03
03
03
04
04
04
04
Q.3
(a)
(a)
(b)
(b)
(c)
(c)
(d)
(d)
Q.4
(a)
(a)
(b)
(b)
(c)
Q.5
ExplainTypeCastingconceptinClanguage.
OR
ExplainFormattedOutputconceptwithexample.
WriteaCprogramtofindareaofacircle.
OR
WriteaCprogramtointerchangetwointegernumbers.
ExplainRelationaloperatorswithexample.
OR
ExplainLogicaloperatorswithexample.
ExplainIfelseifLadderstatementwithexample.
OR
ExplainSwitchstatementwithexample.
03
03
03
03
04
04
04
04
Writedifferencebetweenwhileanddo..whileloop.
OR
Explaingotostatementwithexample.
Writeaprogramtofindmaximumoutofthreenumbers.
OR
Writeaprogramtofindfactorialofagivennumber.
Writeaprogramtoprintthesumofdigitsofagivennumber
(i.e.123=1+2+3=6)
(d) Writeaprogramtoprintfollowingseriesusingloop
13579.55
03
(a) Explainarrayinitializationconceptwithexample.
(b) Writeaprogramtoreadarrayoffiveintegernumbersandcalculatetheir
sumandaverage.
(c) Statehowtowrite,compileandexecuteCprogram.
(d) Ifb=10andc=5thenwhatwillbethevaluesofa,bandcaftertheexecution
offollowingstatement:
a=b++c*2
04
04
************
03
04
04
04
03
03
03
Flowchartalgorithm .
Clanguage.
Constantsvariable.
Clanguagescanf()statement
Clanguagebitwiseoperator.
Breakcontinuestatement .
Clanguageforloop.
Clanguageternaryoperator.
Array .Singledimensionalarray
Array.
Flowchart .
Flowchart.
flowchart.
algorithm.
Cprogram
Clanguageprimarydatatypes.
(1)Intx;(2)floatx=10;(3)longcharb;(4)#definePI=3.14
variablenames :
(1)1total(2)finalresult(3)count$(4)goto
ClanguageTypeCasting .
FormattedOutput .
Cprogram.
integernumbers Cprogram.
Relationaloperators.
Logicaloperators.
IfelseifLadderstatement.
Switchstatement.
Whiledo..while .
Gotostatement.
program.
factorial program.
program.
(123=1+2+3=6)
Loop program.
13579.55
.
Arrayinitialization
integernumbers
program.
Cprogram,
.
b=10c=5statement
c :
a=b++c*2
************
a,b