U.V. Patel College of Engineering: B. Tech Computer Science and Engineering First Internal Examination
U.V. Patel College of Engineering: B. Tech Computer Science and Engineering First Internal Examination
Q.1 (A) Define Operator overloading. Create class Time that has three data members hour, (4)
minute and second and two constructor, default constructor and parameterized
constructor to initialize data member. Write a program to add two times by
overloading operator +.
(B) What is the purpose of Static? Write Characteristics of Static Data Member. (4)
Write a program that demonstrates the Static Data Member.
(C) What is function overloading? Explain function overloading and default argument (4)
with example.
Q.2 (A) Give syntax for constant member function with constant argument. (2)
(B) Give reason why string object are better than C-String. Explain following functions (4)
of string object with example. Getline(), find()
(C) Can we pass object as function argument? Explain with the help of example. (4)
OR
(C) What is constructor? List some of the special properties of the constructor functions. (4)
How we invoke constructor functions. Explain with example.