MCA (Revised)
Term-End Examination
June, 2OO7
MCS-01 SOLVINGAND
1@ : PROBLEM
PROGRAMMING
MCS-O11o P.T.O.
(d) When can two matricesof order a x b and c x d be
subtracted ? Also write a program to find the
differenceof two such matrices. 10
M C S -1
0o1
4. (a) Explain the use of gets, puts, strcmp and strrev
functionswith the help of examples. B
(b)
6
Write a function in C to swap the values of two
(c,:1ff'.r::*:":n:":ffffi,ff,
with an example for each : 6
(i) Goto
(ii) Break
(iii) Continue
u' (a) in
I;::',l,T":''#"il:;,::;:::',',#;:ment 1 0 !
(b) Write a loop that calculatesthe sum of the series : 10
1 + 4 + 7 + 1 0 + 1 3 + . . .
Write the loop in 3 different waYs :
(i) using while loop
(ii) using do-while loop
(iii) using for loop
Also explain the algorithm for the above.
1@
MCS-01 3 3,000