The document is an exam paper for the MCA (Revised) / BCA (Revised) Term-End Examination in Problem Solving and Programming. It contains 5 questions with multiple parts each. Question 1 is compulsory and contains 4 parts asking students to (a) develop an algorithm to add numbers and find average, (b) write a program to find maximum marks from an array of student marks, (c) use pointers to find position of a character in a string, and (d) copy contents of one file to another. The other questions ask students to write programs related to arrays, functions, control statements like goto, string manipulation, macros, and file handling.
The document is an exam paper for the MCA (Revised) / BCA (Revised) Term-End Examination in Problem Solving and Programming. It contains 5 questions with multiple parts each. Question 1 is compulsory and contains 4 parts asking students to (a) develop an algorithm to add numbers and find average, (b) write a program to find maximum marks from an array of student marks, (c) use pointers to find position of a character in a string, and (d) copy contents of one file to another. The other questions ask students to write programs related to arrays, functions, control statements like goto, string manipulation, macros, and file handling.
The document is an exam paper for the MCA (Revised) / BCA (Revised) Term-End Examination in Problem Solving and Programming. It contains 5 questions with multiple parts each. Question 1 is compulsory and contains 4 parts asking students to (a) develop an algorithm to add numbers and find average, (b) write a program to find maximum marks from an array of student marks, (c) use pointers to find position of a character in a string, and (d) copy contents of one file to another. The other questions ask students to write programs related to arrays, functions, control statements like goto, string manipulation, macros, and file handling.
The document is an exam paper for the MCA (Revised) / BCA (Revised) Term-End Examination in Problem Solving and Programming. It contains 5 questions with multiple parts each. Question 1 is compulsory and contains 4 parts asking students to (a) develop an algorithm to add numbers and find average, (b) write a program to find maximum marks from an array of student marks, (c) use pointers to find position of a character in a string, and (d) copy contents of one file to another. The other questions ask students to write programs related to arrays, functions, control statements like goto, string manipulation, macros, and file handling.
(Weightage 75%) Note : Question no. 1 is compulsory. Attempt any three questions from the rest.
1. (a) Give the structure of a C program. Develop
an algorithm, a flow chart and a program to add "n" numbers and find their average. 10 (b) Write a C program to illustrate how the marks of 10 students are read in an array and then used to find the maximum marks obtained by a student in the class. 10 (c) Using pointers, write a C program to find out the position and address of the first occurrence of any character given as input in a string. 10 (d) Write a program, using files, to copy the contents of one file to another with a different file name. 10 MCS-011 1 P.T.O. 2. (a) Write a program to initialize 3 names in an array of strings and display them. 5
(b) What is Call By Value ? Give an example. 5
(c) Explain function prototypes with an
example for each. 10
3. (a) Write a program to print the first 10 even
numbers using "goto" statement. 10
(b) Write a program to read two strings and
append the second string to the first string, using arrays. 10
4. (a) Write a program to swap the values using
the Pass by Value and Pass by Reference methods, separately. 10