How To Exam?

a knowledge trading engine...


Other Bachelor Degree- PROGRAMMING IN C++ (Karunya University, Coimbatore-2011)

Saturday, 24 August 2013 12:12anudouglas
Reg. No. ________                                                                                                                                                   

Karunya University

(Karunya Institute of Technology and Sciences)

(Declared as Deemed to be University under Sec.3 of the UGC Act, 1956)

 

Supplementary Examination - June 2011

 

Subject Title: PROGRAMMING IN C++                                                                                           Time: 3 hours

Subject Code:            CA206                                                                                                                               Maximum Marks: 100          

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

Answer ALL questions

PART – A (10 x 1 = 10 MARKS)

 

1.         In C++, a function contained within a class is called ________.

2.         What header file must you #include with your source file to use cout and cin?

3.         How many values can be returned from a function?

4.         Relational operators have a higher precedence than arithmetic operators. (True/False)

5.         In a class you can have more than one constructor with the same name. (True/False)

6.         All the elements in an array must be the _______ data type.

7.         The >= operator can be overloaded. (True/False)

8.    To be accessed from a member function of the derived class, data or functions in the Base class must be public or ________.

9.    What does this pointer point to?

10.  A file pointer always contains the address of the file. (True/False)

 

PART – B (5 x 3 = 15 MARKS)

 

11.       Assuming var1 starts with the value 20, what will the following code fragment print out?

            cout << var1--;

            cout >> ++var1;

12.       Write a while loop that displays the numbers from 1 to 100.

13.       Define Class.

14.       What is inheritance?

15.       What do you mean by virtual function?

 

PART – C (5 x 15 = 75 MARKS)

 

16.       Explain the different data types supported in C++ with a classification chart.    

(OR)

17.       Describe in detail the various types of operator used in C++.          

 

18.       With a neat flow chart, explain the conditional statements in C++.

(OR)

19.       What is recursion? Explain the usage of inline function with example.

 

20.       Write a program in C++ to calculate employee payroll.

(OR)

21.  Create a class called employee that contains a name (an object of class string) and an employee number (type long). Include a member function called getdata() to get data from the user for insertion into the object, and another function called putdata() to display the data. Assume the name has no embedded blanks.

       Write a main() program to exercise this class. It should create an array of type employee, and then invite the user to input data for up to 100 employees. Finally, it should print out the data for all the employees.

 

[P.T.O]

 

 

22.  Discuss in detail about overloading binary operator in C++.

(OR)

23.       Explain in detail about Member Functions in Multiple Inheritance with suitable example.

 

24.       Discuss in detail about friend function in C++.

(OR)

25.       Write short notes on the following:

            a.         Function Templates                 b.         Class Templates                     


( 0 Votes )

Add comment


Security code
Refresh

Earning:  ₹ 0.00/-
You are here: PAPER Other Bachelor Degree- PROGRAMMING IN C++ (Karunya University, Coimbatore-2011)