Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
641 views

Question Paper C Language

The document contains instructions for a Computer Programming exam for Diploma Engineering students. It includes 5 questions with multiple parts covering topics like flowcharts, algorithms, C programming basics, operators, loops, arrays etc. Students are instructed to attempt all questions, make assumptions where needed, and the exam is in English.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
641 views

Question Paper C Language

The document contains instructions for a Computer Programming exam for Diploma Engineering students. It includes 5 questions with multiple parts covering topics like flowcharts, algorithms, C programming basics, operators, loops, arrays etc. Students are instructed to attempt all questions, make assumptions where needed, and the exam is in English.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Seat No.

: ________

Enrolment No.______________

GUJARAT TECHNOLOGICAL UNIVERSITY


DIPLOMA ENGINEERING SEMESTER I EXAMINATION SUMMER-2015

Subject Code:3310701
Subject Name: Computer Programming
Time:02:30 PM TO 05:00 PM

Date: 30 /05 /2015


Total Marks: 70

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

You might also like