Sie sind auf Seite 1von 2

Roll No. ......................

Total No. of Questions : 13] [Total No. of Pages : 02

J-3587[S-1443] [2037]
B.Sc. (IT) (Semester - 2nd & 3rd)
PROG. IN C++ / OBJECT ORIENTED DEVELOPMENT WITH C++
(B.Sc. (IT) - 303/203)

Time : 03 Hours Maximum Marks : 75


Instruction to Candidates:
1) Section - A is compulsory.
2) Attempt any Nine questions from Section - B.
Section - A
Q1) (15 x 2 = 30)
a) Distinguish between the terms fatal error and nonfatal error.
b) What are base classes? When should they be used.
c) How would you typedef a class to some simple name?
d) Why would a function prototype contain a parameter type declaration
such as double &?
e) Declare an array with arraysize elements of size double, and initialize
the elements to zero.
f) Differentiate between late binding and the early binding.
g) What are the various pitfalls of data conversion.
h) Explain the redirection and command line arguments.
i) How can you relate polymorphism with function overloading.
j) Differentiate between Function overloading and virtual function.
k) How pointer works with the function and how pointers are linked to
the function?
l) How does exception-handling mechanism work?
m) Distinguish between the static binding & dynamic binding.
n) Distinguish between the terms “function template” & “function-template
specialization.”
o) List five common examples of exceptions.

P.T.O.
Section - B
(9 x 5 = 45)
Q2) Write a program that reads in 5 integers and determines and prints the
largest and the smallest in the group.

Q3) Write a program that prints a table of a binary, octal and hexadecimal
equivalents of the decimal numbers in the range 1 to 256.

Q4) Write a program that inputs three double-precision, floating point number
& passing them to a function that returns the smallest number.

Q5) Write a recursive function printarray that takes an array & size of the array
as arguments & returns nothing. The function should stop processing &
return when it receives an array of size zero.

Q6) Write a C++ program with the employee class that makes the two
employees.

Q7) Write a C++ program to sort the numbers by using pointers.

Q8) Write a C++ program to read a set of floating point numbers using the
concept of overloading.

Q9) What are the various properties of virtual function? Compare it with pure
virtual function.

Q10) Write a program to compare two files containing same type of records
using overload operators.

Q11) Explain the syntactic rule for the following random access file member
functions. (a) seekg (b) seekp (c) tellg (d) tellp.

Q12) Write a C++ program to creation of unformatted file.

Q13) Write a program that a string from the keyboard & determines the length
of the string. Print the string in a length that is twice the field width.

!!!!!

J-3587[S-1443] -2-

Das könnte Ihnen auch gefallen