How To Exam?

a knowledge trading engine...


Punjab University 2007 M.C.A Computer OBJECT ORIENTED PROGRAMMING USING C++ (-202) - Question Paper

Tuesday, 07 May 2013 07:40Web

OBJECT ORIENTED PROGRAMMING USING C++ (MCA-202)


Time : 03 Hours
Maximum Marks : 60

Instruction to Candidates:

1) Attempt any 1 ques. from every part - A,B,C & D.

2) part - E is compulsory

3) Use of Non-programmable Scientific Calculator is allowed.


part – A
(1 * nine = 9)

Q1)

(a) discuss briefly characteristics of OOPS language and mention advantages of OOPS approach over functional programming.

(b) discuss the subsequent terms with suitable C++ examples.

(1) kind conversion; High level compiler rule for conversion.

(2) Conditional operator

(3) Make table group of operators in increasing order of precedence.

!, ++, --, -, *, /, %, +, -, <, >, <=, >=, ==, !=, ss, +=, -=, *=, /=, %=

Q2) Create equivalent 4 function calculator. The program requests the user to enter 2 integers. It carries out arithmetic addition of 2 numbers, multiples the outcome with the 2nd number, divided the new outcome with the 1st original number and display the final outcome. The final outcome is acted upon by trigonometrical sine function. The computations so said above is
carried for following sets of fresh integers.

part - B
(1 * nine = 9)

Q3)

(a) provide the tabular difference ranging from structures, unions and classes.

(b) provide the tabular summary of lifetime, visibilty, intialized value, stoarage and purpose of automatic, external, automatic static variables.

Q4) Write a program to swap the 2 arrays of members by pointers, by reference and by value. Compare the 3 ways.


part - C
(1 * nine = 9)

Q5)

(a) explain the memory management function: MALLOC, CALLOC with suitable examples.

(b) discuss Inline member fuction and its benefits over simple function and C's macro

Q6) A survey was made to count number of four wheelers and two wheelers passing a kilometer distance in a busy road Delhi. the survey team needs to maintain the total count of both kinds of vehicles in an hour. Model this survey with class called 'SURVEY'. The data items are a kind 'unsigned int' to hold the count of both types of vehicles. A constructor initializes both these to zero. A member function called four wheel ( ) increments the count and likeness a member function called two wheel ( ) increments the count respectively. A member function called display ( ) the 2 final total. Include prog. to test this class. The prog. should allow user to push 1 key to count four wheelers and a different for two wheelers. Pressing ESC to display the counts and exit.

part - D
(1 * nine = 9)

Q7)

(a) discuss single operator overloading with most suitable program.


(b) discuss the concept of Abstract Classes, virtual base classes and friend functions.

Q8) Write a program to learn data from xyz.dat file and write it into abc.dat file.


part - E
(12 * two = 24)


Q9)

(a) A 'go to statement causes control to go to _________

(b) A function argument is a way that function resist accepting the calling programme's value (T/F).

(c) A data item that is a part of a class is called an __________ variable.

(d) Using pointer notation write a few code that will transfer 80 characters from string s1 to string s2.

(e) Write a declaration for an overload assignment operator in class 'zeta'.

(f) A copy constructor is invoked when a function returns by reference (T/F).

(g) The statement f1.write (char*) & obj 1, size of (obj 1)); does ________

(h) Process.h is used for:

(i) N pointer to 'void' can hold pointers to _________

(j) A constructor is executed automatically when an object is __________

(k) Write a statement that will learn the contents of 1 'ifstream' object called 'if file' into an array called 'buff'.

(l) A child is stated to be __________ from a base class.



( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Punjab University 2007 M.C.A Computer OBJECT ORIENTED PROGRAMMING USING C++ (-202) - Question Paper