SPN NO.: sT. XAVIER'S TECHNICAL |NSTITUTE, MAHIM, MUMBAT 400016 DIPLOMA IN ELECTROT\IICS & TELECOMMUNICATION ENGINEERING SEMESTER EXAMINATION - SUMMER 2017 SEMESTER - III Timeallowed:3hourq Marks - 80 lnstructions : - 1. Answer to the two sections must be written in separate Answer Book/s. 2. lllustrate your answers with neat sketches wherever necessary. 3. Use of Mathematical tables and Pocket calculators (non-programmable) is permissible. 4. Figures to the right indicate full marks. 5. Assume suitable additional data, if necessary. +* +* * *,* ,k *,t ,t 't '* * :k:t.t.* *'F!* ******+**** *+*** ***+** * Q. 1. Attempt any FOUR. i) Define following terms : a) Algorithm b) Flowchart c) Compiler d) Program ii) Explain the basic data types in C. iii) Explain with syntax any two statements used to form loop in C. iv) Explain continue and break statement. Give simple program using these statements alongwith output. v) What is the precedence of the operator? Explain the concept with the help of at least two expressions. vi) What is array? What are its types? List any three features of one dimentional array. Q. 2. Attempt anyTWO a) Write C program to read any three number from keyboard and find smallest among them. b) Write C program to read any ten numbers from keyboard, store them in an array and arrange (sort) them in descending order. c) Explain switch - case structure in C. Give C program using switch along with its output. Q. 3. Attempt any TWO L2 a) i) List rules for giving names to the variable. ii) Explain in detail printf( ) and scanf ( ) statements in C. b) Write C program using loop to evaluate first n terms of following series. Read value of n from keyboard. !+ ?+ 1+ -------- nterms 234 c) Write C program to find largest element of integer type one dimentional array of size 50. L6 t2
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
SPN NO.:
sT. XAVIER'S TECHNICAL |NSTITUTE, MAHIM, MUMBAT 400016DIPLOMA IN ELECTROT\IICS & TELECOMMUNICATION ENGINEERING
SEMESTER EXAMINATION - SUMMER 2017SEMESTER - III
Timeallowed:3hourq Marks - 80
lnstructions : -
1. Answer to the two sections must be written in separate Answer Book/s.2. lllustrate your answers with neat sketches wherever necessary.
3. Use of Mathematical tables and Pocket calculators (non-programmable) is
a) Algorithm b) Flowchart c) Compiler d) Programii) Explain the basic data types in C.
iii) Explain with syntax any two statements used to form loop in C.
iv) Explain continue and break statement. Give simple program using thesestatements alongwith output.
v) What is the precedence of the operator? Explain the concept with thehelp of at least two expressions.
vi) What is array? What are its types? List any three features of onedimentional array.
Q. 2. Attempt anyTWO
a) Write C program to read any three number from keyboard and findsmallest among them.
b) Write C program to read any ten numbers from keyboard, store them inan array and arrange (sort) them in descending order.
c) Explain switch - case structure in C. Give C program using switchalong with its output.
Q. 3. Attempt any TWO L2
a) i) List rules for giving names to the variable.
ii) Explain in detail printf( ) and scanf ( ) statements in C.
b) Write C program using loop to evaluate first n terms of following series.
Read value of n from keyboard.
!+ ?+ 1+ -------- nterms234
c) Write C program to find largest element of integer type one dimentional array
of size 50.
L6
t2
Q. 4. Attempt any FOUR,
a) Define the term function and give its advantages.
b) Explain the tungtionality of the following string library functions:
i) strcat ( i ii) strcmp ( )
c) Discuss various file handling library functions 1
d) With respect to structure concept, define the following terms :
. i) Tag name
ii) Structure variable
iii) Member operator
e) Discuss various storage classes of 'C in brief.
f) Write a program to find factorial of a given number using recursion.
Q. 5. Attempt any TWO,
a) Explain the concept of 'Pass-by-value' and 'pass-by-reference' with
suitable example programs.
b) ln a file named "Data", some decimal numbers are stored. Write a
program which will read one-by-one number from this file and writes even
and odd numbers in the files having names "Even" and "Odd" respectively.
c) Write a program to aompute and print a multiplication table for numbers 1to 5.
Q. 6. Attempt any TWO
a) Create a structure named "Book Store", having book-name, author,
publisher, quantity and price as members. Add some book records using
'Array of Structure' concept and display all these books on the screen. Also
display total money invested by shopkeeper in the book i.e. sum of
quantity x price per each book. :
Write a program to copy one string into another and count the number of
characters copied.
(i) Give the output of the following code snnipet :
intx = 5,y:6;int*P:&x;Y-x++P;Pr int f ( o/od o/od\n ", x, Y) ;
xP:xP*li
Printf (" Vod o/od" ;Y,x');
(ii) Explain the concept of 'A pointer to an Array' with suitable example program.
16
L2
b)
c)
ET-15314/ET-11314,24A17
* ******** ** **** {.* *.k*
ST. XAVIER'S TECHNICAL INSTITUTEMAHIM CAUSEWAY, MUMBAI 4OO 016
P H O N E : 24455937 ; 2445 4559 ; 2445L9 6L; 2446O359
ebrnfide tial
fitil s1J The answers should be examined by key words and not as word-to-word as given in themodel answer scheme.
2) The model answer and the answer written by candidate may vary but the examiner may tryto assess the understanding level of the candidate.
v 3) The language errors such as grammatical, spelling errors should not be given morev Importance [Not applicable for subject English and Communication Skills.
4) While assessing figures, examiner may give credit for principal components indicated in thefigure. The figures drawn by candidate and model answer may vary. The examiner may givecredit for any equivalent figure drawn.
5) Credits may be given step wise for numerical problems. In some cases, the assumed constantvaiues may vary and there may be some difference in the candidate's answers and modelanswer.
6J In case of some questions credit may be given by judgement on part of examiner of relevantanswer based on candidate's understanding.
7) For programming language papers, credit may be given to any other program based on
V equivalent concept.
Serial No.
of QuestionModel Answers Marks
&,,f ; (& l)lat'>-i+h,n^Uro T:X [ < S+.'r, b.t 3-/ uD E*Wt pro ce-AwL I
L:r- q ' \-'-" \^Jf.rl\,t fat\io,, J.rJ,r--rtat-. i+ y?t\ ,tor-rk \az-n'r,fl^), r.-A, r/}^l^-.' i z ,.,.,1. .'-[ LL i t
)Jrr-ta-rLr,) d* / et1'l l*-- -ht't-r r*irr^ i . v yrn,.fh
I
A( znll !'-- Valu'e,
^r'lf t:l *{,- r -.
f b* tlt-.,- fu a, L=lr],s !.=A,r-1 2L I --r I
-x\Yt-ttl 1'r
1
@ ST. XAVIER'S TECHNICAL INSTITUTEMAHIM CAUSEWAY, MUMBAI 4OO 016
P H O N E : 24455937 ; 2445 4559 ; 2445t9 6L; 2446O359
L
U
Serial No.
of QuestionModel Answers Marks
alrea+x r \n-t 1-u^, $^o L,04.-\) u)f i.# {\
flrTFrr - (1 /c-,_ 3- k:.*,a X.kr.lfr--
V\<-ri-11^ ^7zrnna.r\ o
-Z)-
D asr 't., 'TY*exc v:,r o
f^Jlt\t" Ca.\\ itr.,. J ...^- r-vion \+ a dAzz- t .rc\lrl-lr->'a-L\p is vr,t{sJ +L*^, i* 't s rna,+ho d ,*f <r.\\i.r,. -Prrnzl*i *r^ t r.. -rr-T.<;re-rr'aa -TL,
-b,.r1,s..
i .- +\, ) p:z(a-s5r>\ 1 "1
€ at\\ \.- '->e.0 a>,.v h,a p)
6,-'rc.oaln I \ n+ 3k PL I nr. +Fh lf ! ,. ^\^,
6Y7 c)"9-fl-^l>l{ "fn -
- x-O A \,\'Y]F: / ,-.>a\ Z-'7
J^6), ta P )
7t t
1- I n-l q) b= \--9 - h = {.s-.) ->
p-vin+J ( "\* asftn.-'/.* ", o) ',
I
ST. XAVIER,S TECHNICAL INSTITUTEMAHIM CAUSEWAY, MUMBAI 4OO 016
P H O N E : 24455937 ; 24454559 ; 2445t9 6t; 2446O359
@
-t
IF
Serial No.
of QuestionModel Answers Marks
,^<_ fA .nlruqY\f\ -t-o qprn{yate- <t>rfi*.t mr"*l+r,t)f e"tit" **af,J a\=7 I, t\