Page 1
This Question Paper consists of 33 questions of “New Syllabus” and 06 questions of
“Old Syllabus” and 16 total printed pages.
Sl. No.
Roll No.
Code No. “NEW SYLLABUS” : 60/OSS/1/NEW
Code No. “OLD SYLLABUS” : 60/OSS/1/OLD 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 anywhere
other than the specified places will lead to disqualification of the candidate.
4. Write your Question Paper Code No. 60/OSS/1/NEW OR 60/OSS/1/OLD,
Set - A (as applicable) on the Answer-Book.
60/OSS/1/New/Old-330-A] G-652 1 [ Contd...
Page 2
IMPORTANCE INSTRUCTIONS
1. This Question Paper Booklet contains two Question Papers - one based
on revised study material marked as New Syllabus and the other based
on pre-revised study material marked as Old Syllabus.
2. New Syllabus is compulsory for candidates those who have registered
for 2019-20 (Block-I) admission and are appearing in March-April - 2020
Examinations.
3. Old Syllabus is compulsory for those who had registered before 2019-20
(Block-I) admission.
4. Candidates are required to answer only one Question Paper from the
given two Question Papers.
5. Candidates are not allowed to mix questions from the given two Question
Papers.
60/OSS/1/New/Old-330-A] G-652 2 [ Contd...
Page 3
Code : 60/OSS/1/NEW
COMPUTER SCIENCE
(330) (New syllabus)
Time : 3 Hours] [Maximum Marks : 60
Note : (i) Answer all questions.
(ii) Marks allotted to each question are given in the right-hand margin.
1. Name the header files to which the following built in functions belong[2 × ½ = 1]
i) gets()
ii) strcat()
2. Which of the following identifiers cannot be used for naming variable, constants
or functions in a program: [1]
pass&fail,_variable, float, For, IOSTREAM, Your_Book
3. Assume an integer variable MyNumber. Write a C++ statement using Conditional
Operator to assign the value 0 to variable X, if the MyNumber is odd and 1 if
MyNumber is even. [1]
4. Explain the following terms with examples from C++ [2 × 1 = 2]
i) Encapsulation
ii) Polymorphism
5. Give two differences between << and >> operators. [2]
6. Write a function CHECKPRIME(), that takes a number as an argument and
checks whether it is a prime number or not. [2]
7. In a switch..case statement, when is the default statement executed? [1]
60/OSS/1/New/Old-330-A] G-652 3 [ Contd...
Page 4
8. Find the syntax errors from the following program. Justify each error. [2]
#include<iostream. h>
void main()
{
float al=11. 0;
Try_this(fvarl);
}
float Try_this( float fvarl)
{
fvarl++;
cout<<’ The Number is ‘<<fvarl;
}
9. Write the output of the following code. Assume all the required header files are
already included. [3]
#include<iostream. h>
int score=10;
void Testify(int& var , char ch='Z')
{
var=var*score;
if (var%5==0)
cout<<ch;
else
cout<<“Sorry”;
}
void main()
{
int score=11;
char cstr= ‘B’;
Testify(: :score,cstr);
cout<<score<<"*** " <<cstr<<endl;
Testify (score);
cout<<score<<"*** " <<cstr<<endl;
Testify(score, ‘K’);
cout<<: : score<<" " <<cstr<<endl;
}
60/OSS/1/New/Old-330-A] G-652 4 [ Contd...
Page 5
10. Write a function CHECK() in C++ which accepts an integer number as an
argument and displays the reverse of it. [2]
11. Predict the output of the following program : [2]
# include<ctype.h>
#include<stdio.h>
void main ( )
{
char STR[ ]="#E1x2";
for (int b=0; STR[b] != '\0'; b++)
{
if (!isdigit(STR[b]))
STR[b] = '@' ;
else if (isupper (STR[b]))
STR [b] = '*';
else
STR [b] = STR[b+1];
}
puts (STR) ; }
12. Write a function that takes an array of 10 integers and a number as an argument
and displays the position of the number using binary search. [2]
13. Define a static variable. [1]
14. Write a C++ statement that creates an alias of int datatype as cost. [1]
15. Declare a structure CONTACT having Building(string), Floor(int), Street(string)
and City(string) as its members. Thereafter create another structure COMPANY
having the following members :
Reg_No of type integer
CName of type string
Revenue of type float
Address an instance of CONTACT
Write a C++ statement to accept the value of City from the user. [3]
60/OSS/1/New/Old-330-A] G-652 5 [ Contd...
Page 6
16. Define a class Sports_Academy in C++ with following descriptions: [4]
Private members :
SCode of type Long
SName of type String
Course_Fees of type Float
Duration of type integer
Public members :
• Constructor to assign initial values of SCode as 9999, SName as “Khelo”,
course_fees as 100, Duration 99
• A function Enter() which allows the user to enter SCode, SName and
Duration. Also assign the values to Course_Fees as 1000 if duration is
more than 100.
• A function DisplaySports() to display all the details of data members.
17. Consider the following class definition and answer the questions that follow.[3]
class NATION
{
int population;
protected:
int states;
float revenue;
public:
NATION ();
~NATION ();
void INPUT ();
void OUTPUT ();
};
60/OSS/1/New/Old-330-A] G-652 6 [ Contd...
Page 7
class WORLD: private NATION
{
char type;
protected:
int countries;
public:
WORLD () ;
~WORLD () :
void INDATA(int, int);
void OUTDATA ();
};
class STATE: public WORLD
{
char CM[10];
public:
STATE ();
~STATE ();
void DISPLAY(void);
};
i) Name the base class and derived class of the class WORLD.
ii) Name the data member(s) that can accessed from function DISPLAY ().
iii) Name the member function(s) which can be accessed from the objects of
class STATE.
18. Give C++ statements to do the following : [2 × ½ = 1]
i) Create a character pointer myptr
ii) Make myptr hold the address of character variable var.
19. Define Bold & Italic in format pointer. [1]
60/OSS/1/New/Old-330-A] G-652 7 [ Contd...
Page 8
20. Assuming the class CLINIC is defined below. Write a user defined function to
add the objects of CLINIC at the end of the binary file clinicdata .dat. The
records should be entered till the user wishes to. [3]
class CLINIC
{
int Patient_Id ;
char Patient_Name [13];
float fees ;
char Attending_Doctor [30];
public:
void enterdata ( )
{
cin>>Patient_Id;
gets (Patient_Name) ;
gets (Attending_Doctor) ;
cin>>fees;
}
void showdata ( )
{cout<<Patient_Id<<Patient_Name<<fees<<Attending_Doctor;}
};
21. Give one point of difference between ios::app and ios::ate. [1]
22. Write the statement to display the current position of the read pointer in a file that
is opened using the ifstream object named F1. [1]
23. Define the following : [2]
i) Flat file
ii) Database
24. Define normalization. [1]
25. Differentiate between degree and cardinality. [1]
60/OSS/1/New/Old-330-A] G-652 8 [ Contd...
Page 9
26. Observe the table -EMPLOYEES given below and write the queries (i), (ii) and
(iii) that follow. [3 × 1 = 3]
Table : EMPLOYEES
EMPID FNAME LNAME ADD CITY
101 MRINALINI JAIN 45 AVE BANGALORE
109 SAMARTH TOBY 67 DLF GURGAON
106 SARAH KHAN 98 CPURI DELHI
116 MANI SWAMY 77 CDG CHANDIGARH
234 ROHIT SAMBAL 65 DLH N DELHI
452 RANJIT LOTA 33 SLOK GURGAON
674 PEETAMBAR TRILOK 42 GM MUMBAI
i) To display the contents of EMPLOYEES table in descending order of
FNAME.
ii) To display the names of each city only once.
iii) To delete the records of the employees who stay in Delhi.
27. Give one difference between <P> and <br> element in HTML. [1]
28. Differentiate between container and empty elements. Give two examples of each.
[2]
60/OSS/1/New/Old-330-A] G-652 9 [ Contd...
Page 10
29. Design the following web page with the specifications given below. [3]
Internet
Internet is network of networks. It connects each one of us across the globe.
Using Internet, we can send emails, watch videos, book airline,
railway or movie tickets.
It also helps us to view online tutorials.
i) The title of the page should be Internet.
ii) The background colour of the page is pink and the text colour is red.
iii) The heading is in the centre of the page, has the font style as “Impact”,
colour as blue and size as 20.
iv) The paragraph should be of font size 16.
v) The width of the solid line in the centre is of 5 pixels, is of blue colour and
covers half the page.
30. Differentiate between JPG and GIF image formats. [2]
31. Write the HTML code to create the following list (Rectangular Border is not required)
[3]
Types of Networks
· PAN
· LAN
· MAN
· WAN
Applications of Networks
A. Sharing of Resources
B. Communicating with any one across the globe
32. Define Universal virtualization. [1]
33. Give two advantages of cloud computing. [1]
60/OSS/1/New/Old-330-A] G-652 10 [ Contd...
Page 11
Code : 60/OSS/1/OLD
COMPUTER SCIENCE
(330) (Old syllabus)
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 : [4 × 1 = 4]
a) Protocol
b) Teleconferencing
c) FTP
d) WORM
2. a) Differentiate between the following : [3 × 2 = 6]
i) 3 GLs and 4 GLs
ii) Volatile and non-volatile memory
iii) Dial-up Connection and Leased Connection
b) Explain in brief three types of Network Topologies. [3]
c) Name the protocol that is used to download e-mails from a web server. [1]
d) Give the DOS commands to do (i) Format a disk and make it bootable
(ii) Copy all files & subdirectories from directory d1 to directory d2.[1]
60/OSS/1/New/Old-330-A] G-652 11 [ Contd...
Page 12
3. a) Name the header files to which the following built in functions belong : &
give one line description of each function. [2 × 1 = 2]
i) strcpy()
ii) getch()
b) Explain the following terms with examples from C++: [2 × 2 = 4]
i) Data Encapsulation
ii) Inheritance
c) What is the difference between a keyword and identifier? [2]
Also give a C++ example.
d) Which of the following cannot be used as an identifier in C++ programs?[1]
myfile, double, Break, roll-no,_123 Main
e) Write a program to accept a number n and print the biggest digit in n . For
eg if [3]
n is 2086 then 8 is the biggest digit and it is printed in the output.
4. a) Write a C++ statement to compare equality of two strings.
(without using if..else statement) [1]
b) Find the syntax errors from the following program. Justify each error. [2]
void main()
{ int X=10,Y=15;
cout<<sum_val(X, Y);
}
void sum_val(int x, int y)
{
return x+y;
}
60/OSS/1/New/Old-330-A] G-652 12 [ Contd...
Page 13
c) Write the output of the following program : [3]
int a=8;
void Print(int a)
{ if(a%4==0) cout<<::a/2<<‘,’;
else cout<<a*2<<endl;
}
void main()
{
for(int x=1; x<=10; x++)
Print(x);
cout<<a * x<<endl;
}
d) What is the difference between & and && operators. Give example in support
of your answer. [2]
e) Write a function validate in C++ which converts the middle character of
any string to uppercase. For example string “abcde” having length 5 is
produced in o/p as “abcde”. If there is no middle character then first character
is converted to uppercase - For example “abcd” is given as “Abcd” in o/p.
[3]
5. a) Predict the output of the following program : [2]
void main( )
{ char wish[] = “ALLTHEBEST”;
for(int Len=0; wish[Len] !=‘\0’; Len++);
for(int I=Len-1; I>=0; I– –)
{ for(int J=0; J<=I; J++) cout<<wish[J];
cout<<endl;
}
}
60/OSS/1/New/Old-330-A] G-652 13 [ Contd...
Page 14
b) Define a class Mobile in C++ with the following descriptions : [3]
Private members:
m_code, m_type and m_os_name of type string
m_mrp_value, m_discount and m_sale_price of type float
Public Members:
i) A constructor to assign initial values of m_code with “MCODE01’’,
m_type with “Tablet”, m_os_name with “Android”, m_mrp_value,
m_discount and m_sale_price with 0.
ii) A function GetData( ) to input the values of the all data members.
iii) A function to Display( ) which displays the content of all the data
members for a Mobile.
c) Consider the following class definition and answer the questions that follow.[3]
class Film
{
int Film_Id, Film_Name, LeadRoles;
public:
char LeadRoleInMale[30], LeadRoleInFemale[30];
Film( );
void Accept( );
void Display( );
};
class Commercialfilm::public Film
{
int No_of_songs;
float Cost_per_song;
protected:
int Type_code;
public:
char Remake;
Commercial_film( );
void Accept_comm( );
void Display( );
};
60/OSS/1/New/Old-330-A] G-652 14 [ Contd...
Page 15
class ArtFilm::private Film
{
char Theme[50];
public:
void Accept_art( );
void Display( );
};
i) What is the size of the object of class ArtFilm?
ii) Which data members are accessible from the member function of the
class ArtFilm?
iii) Name the member functions, which can be accessed from the object of
class ArtFilm.
d) Write a program in C++ to find and print the second largest number in an
array of size N. [4]
6. a) Define typedef. [1]
b) Define a C++ nested structure for the record given below. Use appropriate
data type.
RollNo. Name Marks Address
House No.
City
State
Write a C++ statement to the assign a value of each variable in a nested
structure. [2]
c) Give the C++ statements to do the following : [2]
i) Declare a pointer to an int type.
ii) Create a constant character pointer.
60/OSS/1/New/Old-330-A] G-652 15 [ Contd...
Page 16
d) Given a binary file “ELECTION.DAT”, containing records of the given
class Election.
class Election
{
int ward_no ;
char candidate[20]; /*name of the candidate*/
public:
void input( )
{
cin>>ward_no>>candidate;
}
void output( )
{
cout<<ward_no<<candidate;
}
char* ret_candidate( )
{
return candidate;
}
};
Write a function to read a file ELECTION.DAT to print only those records
whose name begin with ‘A’. [3]
e) Differentiate among the ios::out, ios::app, ios::ate and ios::in. [2]
60/OSS/1/New/Old-330-A] G-652 16