Page 1
This Question Paper consists of 6 questions and 8 printed pages.
Sl. No.
Roll No. Code No. 58/OSS/1
Set > A
COMPUTER SCIENCE
(330)
Day and Date of Examination
Signature of Invigilators 1.
2.
General Instructions :
1. Candidate must write his/her Roll Number on the first page of the Question Paper.
2. Please check the Question Paper to verify that the total pages and total number of
questions contained in the Question Paper are the same as those printed on the top
of the first page. Also check to see that the questions are in sequential order.
3. Making any identification mark in the Answer-Book or writing Roll Number any-
where other than the specified places will lead to disqualification of the candidate.
4. Write your Question Paper Code No. 58 /OSS/ 1, Set - A on the Answer-Book.
58/OSS/1-330-A] G-243 1 *58/OSS/1-330-A* [ Contd......
Page 2
COMPUTER SCIENCE
(330)
Time : 3 Hours] [Maximum Marks : 60
Note : (i) Answer all questions.
(ii) Marks allotted to each question are given in the right-hand margin.
(iii) Use C++ programming language to answer the programming questions.
1. Define the following : [1 × 4 = 4]
a) Topology
b) Telnet
c) www
d) Sorting
2. a) Distinguish the following. [2 × 3 = 6]
i) Shell Connection and TCP/IP Connection
ii) MICR & OMR
iii) 3 GLs & 4 GLs
b) Name the protocol that is used for uploading/downloading files on a Network.
[1]
58/OSS/1-330-A] G-243 2 *58/OSS/1-330-A* [ Contd......
Page 3
c) Explain three data Transmission model. [3]
d) Name two types of access for sharing files & printers attached to a Computer.
[1]
3. a) Write down the corresponding header files of the following built-in functions.
[2 × 1 = 2]
i) getchar ()
ii) tolower ()
b) Write a program to accept a number and print maximum and minimum digit in
that number. [3]
c) Explain the following terms with examples from C++. [2 × 2 = 4]
i) Abstraction
ii) Polymorphism
d) Distinguish between Contrast implicite and explicite type conversion with
examples. [2]
e) Which of the following cant be used as identifier for naming variable profit,
float, while, MAIN. [1]
4. a) Assume an integer variable num. Write a C++ statement using conditional
operator to display "EVEN" if the number is even and "ODD" otherwise.[1]
58/OSS/1-330-A] G-243 3 *58/OSS/1-330-A* [ Contd......
Page 4
b) Find the syntax error in the following code. [2]
#include<iostream.h>
void exam(float a2)
{
cout<< "The Argument is"<<a2;
}
void main( )
{
float a1 = 11.0;
exam(a2);
}
c) What is the difference between "=" and "= =" operator. Illustrate with one
example. [2]
d) Write the function VERIFY () in C++ which accepts a character as an argument
and checks whether it is a digit or not? [3]
e) Write the output of the following program : [3]
#include<iostream.h>
void main()
{
static int i = 5;
if (i > 0)
{
cout << i--;
main();
}
}
58/OSS/1-330-A] G-243 4 *58/OSS/1-330-A* [ Contd......
Page 5
5. a) Predict the output of the following program : [2]
# include<iostream.h>
int main (void)
{
int i = 122;
while (i! = 97)
i--;
while (i > 65)
i--;
printf ("% c", i);
return 0;
}
b) Define a class 'World Cup' with the following specification : [3]
Private Members:
Match_ID Numeric
Venue String
Date String
Team1 String
Team2 String
Public Members:
A constructor that initializes all numeric numbers with '0' and all string
with "ABC".
Accept( ) _ that accepts the entire data
Show( ) _ that displays the entire data
58/OSS/1-330-A] G-243 5 *58/OSS/1-330-A* [ Contd......
Page 6
c) Consider the following class definition and answer the questions : [3]
Class Toys
{
char toy_type[10];
protected: Toys[ ];
char choice;
void toyinput();
void toyshow();
};
Class MyToys : Protected Toys
{
char mtoy_name[10];
float weight;
protected :
int no_wheels;
public :
void MyInput();
}
Questions :
i) Which type of inheritance is shown above?
ii) What data members are accessible from MyInput( )?
iii) Name the member functions which are accessible from the object of
class MyToys?
d) Write a program to find the largest number in an integer array of size 10. [4]
58/OSS/1-330-A] G-243 6 *58/OSS/1-330-A* [ Contd......
Page 7
6. a) Which statement is used to create an allias of a datatype. [1]
b) Declare a structure COMPLEX no having real part and imaginary part as its
members.
Put it inside a class number and initialize its member with/without a constructor.
[2]
c) Give a C++ statement to do the following : [2]
i) Create an integer pointer ptr
ii) Make ptr hold the address of integer variable var.
d) Explain the two methods of opening a data file in C++. [2]
e) Assuming the class HOSPITAL defined below, write a user defined function
to read the objects of HOSPITAL from the binary file Hospi.dat and display
the records of only 'Surgical' department. [3]
class HOSPITAL
{
int Patient_Id;
char Patient_name[13];
char OPD_Date[10];
float fees;
char Dept[20];
public:
void enterdata( )
{
cin>>Patient_Id;
gets(Patient_name);
gets (OPD_Date);
cin>>fees;
gets(Dept);
58/OSS/1-330-A] G-243 7 *58/OSS/1-330-A* [ Contd......
Page 8
}
void showdata()
{
cout<<Patient_Id<<Patient_Name
<<OPD_Date<<fees<<Dept;
}
char []getdept();
{
return Dept;
}
};
ssss
58/OSS/1-330-A] G-243 8 *58/OSS/1-330-A*