Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

MCS011 - June 2022

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

No.

of Printed Pages : 3 MCS-011

om
MCA (Revised) / BCA (Revised)
Term-End Examination
June, 2022

.c
ru
MCS-011 : PROBLEM SOLVING
AND PROGRAMMING

u
Time : 3 hours Maximum Marks : 100

tG
(Weightage : 75%)
en
Note : Question no. 1 is compulsory. Answer any
three questions from the rest.
m

1. (a) Draw a flowchart and write an algorithm to


calculate the factorial of a given number. 10
ign

(b) Write a program to display string


‘INFINITY’ in the following pattern (using
ss

‘‘LOOP’’ control statement) : 10


I
UA

IN
INF
INFI
NO

INFIN
INFINI
INFINIT
IG

INFINITY
MCS-011 1 P.T.O.
(c) Write a program to generate Fibonacci
series using recursion. 10

om
(d) Write an interactive C program for each to
illustrate the following concepts : 10

.c
(i) Enumerated data type

ru
(ii) Macros in C

(iii) Typedef

u
tG
(iv) Goto statement

2. (a) Write an algorithm and draw the


en
corresponding flowchart to calculate
whether the given number is prime or not. 10
m

(b) Write a C program to perform the following


ign

operation on matrices :

D = (A*B) + C

where A, B and C are matrices of 3  3 size


ss

and D is the resultant matrix. 10


UA

3. (a) Write a program to find the minimum


marks among the given marks of
NO

20 students. 10

(b) Write a program to find the string length


without using strlen( ) function. 10
IG

MCS-011 2
4. (a) Define function. How are functions

om
declared in C language ? What are function
prototypes and what is the use of return
statements ? 10

.c
(b) Explain the function ‘‘call by reference’’ in
C language. Give advantages and

ru
disadvantages of it. 10

u
5. (a) Explain the following statements with the

tG
help of an example for each : 10

(i) Break
en
(ii) Goto
m
(iii) Continue

(b) Using File Handling Concept, write a


ign

program to copy one file to another. 5

(c) Write a short note on Ternary Operator


ss

with an illustration. 5
UA
NO
IG

MCS-011 3 P.T.O.

You might also like