Friday, December 19, 2008

MCS-011 : PROBLEM SOLVING AND PROGRAMMING June-2007

MCS-011
MCA (Revised)
Term-End Examination
June, 2007

MCS-011 : PROBLEM SOLVING AND PROGRAMMING

Time : 3 hours

Maximum Marks : 100 (Weightage 75%)

Note : Question number 1 is compulsory. Attempt any three questions from the rest.

1. (a) Design an algorithm, draw a corresponding flow chart and write a program in C, to swap the values using pass by value and pass by reference methods. 10

(B) Write an algorithm and program in C to print fibonacci series. 10

© Write a program to generate the pattern 10

1 2

1 2 3

1 2 3 4

1 2 3 4 5

(d) When can 2 matrices of order a x b and c x d be multiplied ? Also write a program in C to find the product of 2 such matrices. 10

2. (a) Explain the concept of a function returning a pointer with an example. 6

(B) Write a macro to find the sum of n numbers. 7

© Write a program in C, to copy filel to another file2 in the same directory. 7

3. (a) Draw a flow chart and write a program in C to sort a given list of numbers. 7

(B) Write a program in C to compare two strings without using String Compare function. 5

© Explain various types of storage classes in C with example for each. 8

4. (a) Explain use of comma operator in C with the help of an example. 5

(B) What is the difference between & and && ? Explain with an example. 5

© Write a program in C using structures to simulate salary calculation for employees of a company. Assumptions can be made wherever necessary. 10

5. (a) Write a program to count the number of characters and words in a given file. 10

(B) Write a program to display the string "EARTH" in the following format : 10

E

E A

E A R

E A R T

E A R T H

E A R T

E A R

E A

E

No comments:

Post a Comment