0% found this document useful (0 votes)
69 views1 page

U.V. Patel College of Engineering: B. Tech Computer Science and Engineering First Internal Examination

This document contains a first internal examination for a computer science course. It has 3 questions with multiple parts each. Question 1 covers operator overloading, static data members, and function overloading. Question 2 covers constant member functions, string object functions like getline() and find(), and passing objects as function arguments or constructors. Question 3 asks to attempt two parts on overloading operators for strings, inline functions to find largest number, and stream manipulators like setfill and setprecision.

Uploaded by

Dhruv Pandit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views1 page

U.V. Patel College of Engineering: B. Tech Computer Science and Engineering First Internal Examination

This document contains a first internal examination for a computer science course. It has 3 questions with multiple parts each. Question 1 covers operator overloading, static data members, and function overloading. Question 2 covers constant member functions, string object functions like getline() and find(), and passing objects as function arguments or constructors. Question 3 asks to attempt two parts on overloading operators for strings, inline functions to find largest number, and stream manipulators like setfill and setprecision.

Uploaded by

Dhruv Pandit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

U.V.

Patel College of Engineering


B. Tech Computer Science and Engineering
First Internal Examination
Sub: Essentials of Software Foundation & Programming - II (2CSE203)
Date: 02/03/15 Time: 9:00 A.M. to 10:00 A.M Total Marks:30

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.

Q.3 Attempt any Two (8)


(A) Write a program to overloaded '+' operator for concatenates strings.
(B) What is Inline Function? Write a program using Inline Function to find largest of
three numbers.
(C) Explain following manipulators of C++ with example.
a) setfill b) setprecision

You might also like