Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Q.1: Attempt any TEN of the following: (2 x 10 = 20) a) Define the term data banding messaging.

b) Give the structure declaration 100 student having following members 1) Student name. 2) Roll number 3) Percentage. c) Describe the term class and object. d) Describe the function of * and & with example? e) Describe the term Destructor. f) Define overloading of operator ? g) what is type casting ? Describe with example? h) State the similarity between pointer and array? i) List the types of polymorphism. j) Describe the access specifier used and not used for inheritance . k) What is parameterized constructor constructor? l) Describe abstract class? With example.

Preliam Paper II

C++

100 marks

Q.2: Attempt any FOUR of the following: (4 x 4 = 16) a)What are the different types of inheritance? Describe any one with suitable example. b)What is friend function?Stsate it necessity and demonstrate with example c) Differentiate between early binding and late binding. d) Write a program to calculate simple interest using the concept of function overloading. e) What is runtime polymorphism? Explain with example f) Write a program to read 10 element and find maximum of 10 number using pointer. Q.3: Attempt any FOUR of the following: (4 x 4 = 16) a) Find out the errors, if any, in the following program #include<iostream.f> class emp { private: char name[20]; char city[20]; public: emp(char *a, char *b) { name[20]=*(a+20); strcpy(city,b); } }; void main() { employee my(Manoj,kavedia); } b) Write a program to swap two integer values by using call by value without using third variable. c) What is dynamic memory allocation? Describe the function of new and delete operator with example. d) Write a program to illustrate the concept of copy constructor. e) Illustrate the term multiple constructor. f) Write a program to overload == operator so that it will perform compare of two strings. Q 4: Attempt any FOUR of the following: (4 x 4 = 16) a) Write a program to declare a class mobile having data members as 1) price. 2) Model number. Accept and display this data for ten object.

b) Define a class containing operator function to overload unary minus (-) operator. Assume suitable data. c) Write a program to implement inheritance as shown in fig. given below. Assume suitable member functions. d) Compare procedure oriented and Object oriented language e) Describe with example user defined manipulator? f) Write program to read a file , and display number of line , total character in that file. Q.5 Attempt any TWO of the following: (4 x 4 = 16) a) Write a program to find length of the string using pointer to string. Concept without using string function. b) Write a program to accept two filenames from command line i.e. source and destination filenames. Copy contents of source file to destination file. c) Write a program to declare a class employee, consisting of data members emp_no, emp_sal , and emp_name. Write the member functions accept() to accept and display() to display the data for 50 employees having average salary between 5000-10000. d). Describe overloading of Binary operator with friend function. e)Write program to read a line from command prompt , and find out number a,e,o,u,I vowel and consonant in that line. Also list total character in that line. Q.6 Attempt any FOUR of the following: (4 x 4 = 16) a) Find the errors from the following code.Rectify the code

Class Complex { int real , imaginary; public : void complex(); void readdata(); void showdata(); } void main() { complex c1; c1.ReadData(); c1.DisplayData(); }

b) write program to read character from console till z is pressed and as soon as z is pressed write all those data in file. c) Compare the following i) get() and getline() ii) get() and read() d) List and describe then set function used for screen manipulation e) What is function overriding explain with example. f) Write the program to demonstrate object as argument to function and function returning object.

You might also like