June - 2019 MCS-011
June - 2019 MCS-011
m
No. of Printed Pages : 3 mcs-on
.co
MCA (Revised)/BCA (Revised)
(MCA/BCA)
Term-End Examination
u
June, 2019
ur
MC9-011 : PROBLEM SOLVING AND
PROGRAMMING
tG
Time : 3 Hours
en Maximum Marks : 100
(Weightage : 75%)
Note : Question No. 1
is compulsory. Answer any
three questions from the rest.
m
continue
statements with the help of a program. 10
(c) Write a program to generate the following
A
pattern : 10
1
OU
1 2
1 2 3
N
1 2 3 4
1 2 3 4 5
IG
(A.4) P. T. 0.
1
[2] MCS-011
m
statement to perform the following
arithmetic operations on two variables : 10
.co
(i) Add
(ii) Subtract
u
(iii) Multiplication
ur
(iv) Division
tG
to strings to read name of your five friends
and display them. 10
en
(b) Write a C program to calculate simple
interest. If principal amount, rate of
m
interest and duration are given as input.10
(Note : SI = P xR x T
ign
100
A x B. 10
(b) Explain the following with the help of an
A
(A-4)
[ 3 ]
om
evaluate : 5
f(x)=3x 3 +2x2 +x
(b) Write a C program which display the
u.c
number of lines in a given file. 10
(c) Define recursion. With the help of a small
C program segment and explain it. 5
ur
5. (a) Explain the use of the following file
tG
functions : 4 x 2 12 = 10
(i) fseek())
en
(ii) rewind())
fte110
m
(iv) fwrite( )
(b) Write a program to check whether a given
ign
MCS-011 1 0 , 000
IG
(A-4)