How To Exam?

a knowledge trading engine...


Biju Patnaik University of Technology 2011 B.Tech Electrical Engineering Fist internal , Object oriented programing c++, Gandhi Institute for Technological Advancement, Bhubaneswar - Question Paper

Friday, 24 May 2013 03:45Web

GANDHI INSTITU FOR TECHNOLOGICAL ADVANCEMENT
CLASS TEST-1,3RD Sem

Sub-OOP (C++) Time-1 hr.
Branch-EE Full Marks-20
[Answer any 3 including ques. No.-1]
Q1.Short ans kind Questions [1x6]
i) #include
void f(int %x)
{
X+=10;
}
void main()
{ int m=10;
F(m);
Cout<}
obtain Output of the subsequent program

ii) )#include
void main()
{
Int I;
For(i-0;i<=10;i++)
If(!(i%2))
Continue;
Else
Cout<}
obtain Output of the subsequent program

iii) )#include
class A
{
Public:
A()
{cout<<"I am the constructor";}
};
Void main()
{
A a1;
}
A a2;
}
obtain Output of the subsequent program

iv)int fun(int *x, int *y)
{
If(*x>*y)
return (*x);
else
return (*y);
}
Write every thing needed in function main for calling the above function.
v) discuss the 2 primary differences ranging from a pointer variable and reference variable.
vi)
a) A class has 1 data member and 1 method member. If we declare five objects of this class then the number of addresses for data member and method member are _________ and _______ respectively.
b) When an object of class is goes out of scope _______ is called automatically.
Long Questions- [7x2]
2) elaborate the characteristics of a friend function? Design two classes called husband and spouse having data member to represent their corresponding salary. Include methods to learn and display the salary of the corresponding classes. Include a member function in the spouse class called total_income() which display the total income of the family.

3) elaborate the difference ranging from constructor and destructor? Design a class called time having data members to represents hour, min and second. learn time in seconds using parameterized constructor, assign it to the corresponding data members after proper conversion and display them in hr: min: sec format.
Design a class called time having data members to represents hour, min and second. learn time in seconds using parameterized constructor, assign it to the corresponding data members after proper conversion and display them in hr: min: sec format.
Design a class called time having data members to represents hour, min and second. learn time in seconds using parameterized constructor, assing it to the corresponding data members after proper conversion and display them in hr:min:sec format.
4) What is copy constructor? explain the cases in which it is invoked. Write a program to implement user described copy constructor.




( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Biju Patnaik University of Technology 2011 B.Tech Electrical Engineering Fist internal , Object oriented programing c++, Gandhi Institute for Technological Advancement, Bhubaneswar - Question Paper