July 2011 Master of Computer Application (MCA) – Semester 2 MC0066 – OOPS using C++ – 4 Credits

(Book ID: B0681 & B0715)

Assignment Set – 1 (40 Marks)
Answer all Questions Book ID: B0681 Each Question carries ten Marks

1. Write a program in C++ for matrix multiplication. The program should accept the
dimensions of both the matrices to be multiplied and check for compatibility with appropriate messages and give the output.

2. Write a program to check whether a string is a palindrome or not. Please note that palindrome is one which remains the same if you reverse the characters in the string. For example “MADAM”.

3. What is structure in C++? Define a structure named product with elements productcode, description, unitprice and qtyinhand. Write a C++ program that implements the structure and enables to store atleast 100 product data.

Book ID: B0715 4. What is the purpose of exception handling? How do you infer from the phrase, “Throwing an exception”?. . .

Write about the following with the help of suitable programming examples: A) Throwing an Exception B) Catching an Exception . What are allocators? Describe the sequence container adapters. 4. Write a program which accepts a number from the user and generates prime numbers till that number 2.July 2011 Master of Computer Application (MCA) – Semester 2 MC0066 – OOPS using C++ – 4 Credits (Book ID: B0681 & B0715) Assignment Set – 2 (40 Marks) Answer all Questions Each Question carries ten Marks Book ID: B0681 1. Book ID: B0715 3. Implement a class stack which simulates the operations of the stack allowing LIFO operations. Also implement push and pop operations for the stack.

Sign up to vote on this title
UsefulNot useful