0% found this document useful (0 votes)
22 views4 pages

MCS-11 D08

Uploaded by

Dr Satish Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

MCS-11 D08

Uploaded by

Dr Satish Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MCA (Revised)

Term-End Examination
December,2(X)8

' MCS-011: PROBLEM SOLVING AND


PROGRAMMING
Time : 3 hours MaximumMarks :100
|f)
(Weightage75%)
nfoA : Questionnumberl is compulsory. Answerany three
!
.-{ questionsfrom the rest.

1. (a) Design an algorithm, draw a corresponding 10


flow chart and write a program in'C', to
find the factorial of a given number using
recursion.
(b) Write a'C' program to find whether a given l0
five digits number is a palindrome.
(") Write a program in'C' to find all Armstrong 10
numbers in the range of 0 and 999.
Hint: An Armstrong number is an integer
such that sum of the cubes of its digits is
equal to the number itself, e.g. : 153 is
Armstrong number.
(d) When can two matricesof order mxn and 10
p x q be multiptied ? Also write a program
in 'C' to multiply two such matrices.
2. (u) Write a program in 'C' to generate a 10
progress report for students which displays
the total marks, avetage,and grades. The
input for the system are marks secured in
five courses (Assignment and Term end
Examination). Pass (40%) in both the
components are compulsory. Grades may
be given accordingly. Assumptions can be
made if necessaryand specify them.

(b) What is the difference between " &" and. 5


"&&' ? Explain with an example.

(c) Write a loop that calculate sum of. the n 5


elements of the series:
'1.
+7 +13 +'1,9+ 25 +
Write the loop in 3 different ways :

(i) using while loop

(ii) using do-while loop

3. (u) Write a macro to find out whether the given z


character is lower case or not.

(b) Write a program in'C'to check whether 8


the given ye.aris leap or not. Also explain
the logic of the program.

(c) Write a function definition to find the s


smallest among the given three numbers.
4. (a) Without using the'strcpy'functiorL write a 10
program to copy contents of string 2 to
string 1, and find the length of the copied
string using pointers.
(b) Write the usage of the following data types, 10
with an example for each:
(i) enumerated data type.
(ii) typedef.

J. (a) Design an algorithm and draw 10


corresponding flow chart to convert a
decimal number to its Hexadecimal
equivalent.
(b) Explain the following storageclassspecifiers 1.0
of a variable in terms of default value,
lifetime, scope purpose and limitations
(with an example)
(i) Auto
(it Register

-oOo

You might also like