0% found this document useful (0 votes)
234 views5 pages

Sample Question Paper Final Cs 330

1. The document is a sample question paper for Computer Science with 24 questions ranging from 1 to 4 marks. The questions cover topics like C++, SQL, HTML, OOPs etc. 2. The maximum marks for the paper is 60 and the time duration is 3 hours. 3. The questions include writing C++ code segments, explaining concepts, differentiating between topics, displaying outputs etc.

Uploaded by

Durlav
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)
234 views5 pages

Sample Question Paper Final Cs 330

1. The document is a sample question paper for Computer Science with 24 questions ranging from 1 to 4 marks. The questions cover topics like C++, SQL, HTML, OOPs etc. 2. The maximum marks for the paper is 60 and the time duration is 3 hours. 3. The questions include writing C++ code segments, explaining concepts, differentiating between topics, displaying outputs etc.

Uploaded by

Durlav
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/ 5

Sample Question Paper

Computer Science (330)

Maximum Marks : 60 Time Allowed : 3 hours

1. Name the header files to which the following built in functions belong ( ½ * 2 =1)

i. getchar()
ii. tolower()
2. Assume an integer variable num. Write a C++ statement using Conditional Operator to display “ODD “
if the number num is odd and “EVEN “ otherwise. (1)
3. Which statement is used to create an alias of a datatype? (1)
4. Define virtualization. (1)
5. Name the four ways through which cloud computing can be deployed. (1)
6. Why do we use <BLOCKQUOTE> element? (1)
7. Define the following terms: (2)
(i) Modularity
(ii) Polymorphism
8. Predict the output of the following program: (2)

# include<iostream.h>
# include<ctype.h>
#include<stdio.h>
void main()
{
char Text[]=”#GO2D”;
for (int I=0; Text[I]!='\0'; I++)
{
if (!isalpha(Text[I]))
Text[I] = '*';
else
Text[I] = Text[I+1];
}
puts(Text);
}

9. (2 x 2 = 4)
(a) Give one difference between Implicit and Explicit Type Conversion. Give one example of each to
support your answer.

(b) Differentiate between exit controlled loop and entry controlled loop giving examples.

10. Write the output of the following program: (2)

#include<iostream.h>
int point=5;
void modify(int&var , int n=2)
{
1
var=var*n;
n=var--/5;
}
void main()
{
int point=50,ques=10;
modify(::point,ques);
cout<<point<<"#### " <<ques<<endl;
modify(point);
cout<<point<<"### " <<ques<<endl;
modify(ques,10);
cout<<::point<<" " <<ques<<endl;
}

11. Declare a structure ADDRESS having HouseNo(int), Locality(string), Street(string) and City(string) as its (3)
members. Thereafter create another structure ADMISSION having the following members:

Adm_No of type integer

Name of type string

Category of type string

S_Address an instance of ADDRESS

Write a C++ statement to accept the value of Locality form the user.

12. Give a C++ statements to do the following: (2)


(i) Create an integer pointer ptr
(ii) Make ptr hold the address of integer variable var.

13. Give SQL statements with respect to the table given below: (3)

Table : Subjects
Subject_ID SubjectName Faculty_Expert Book_name Periods Practical
S01 Maths Raman ABC 14 N
S02 Science Agarkar DEF 13 Y
S03 Social Suresh XYZ 13 N
S04 Computer Sumita PQR 12 Y
S05 Telugu Nannayya ABC 6 N
S06 English Wordsworth DEF 14 N

(i) To display the names of subjects in descending order of periods.


(ii) To change the name of the book of Computer to CCCC
(iii) To display the names of the Faculty_Expert whose periods are less than 14
14.
Find the syntax errors from the following program. Justify each error. (2)

#include<iostream.h>
void exam( float a2)
{
cout<<’The Argument is ‘<<a2;
}
2
void main()
{
float a1=11.0 ;
exam(a2);
}

15. Write a program to sort an array of integers in descending order using selection sort. (2)

16. Define a class IPL with the following specifications: (4)


Private Members:
Match_ID numeric
Venue String
Date String
Team1 String
Team2 String
Public Members:
 A constructor that initializes all numeric members with 0 and all strings with “XYZ”
 Accept() – that accepts the entire data
 Display() – that displays the entire data

17. Consider the following class definition and answer the questions that follow. (3)
class Toys

{
char toy_type[10];
protected:
float price;
void cal_price(float);
public:
Toys();
char choice;
void toyinput();
void toyshow();
};
class MyToys : protected Toys
{
char mtoy_name[10];
float weight;
protected:
int no_wheels;
public:
void MyInput();
};

i. Which type of inheritance is shown in the above example?


ii. Which all data members are accessible from MyInput()?
iii. Name the member functions which are accessible from the object of class
MyToys.MyInput().
18. 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)
3
class HOSPITAL
{
intPatient_Id
charPatient_Name[13];
charOPD_Date[10];
float fees;
charDept[20];
public:
voidenterdata()
{
cin>>Patient_Id;
gets(Patient_name);
gets(OPD_Date);
cin>>fees;
gets(Dept);
}
voidshowdata()
{cout<<Patient_Id<<Patient_Name<<OPD_Date<<fees<<Dept;}

char []getdept()
{returnDept;}
};

19. (a) Differentiate between logical and physical record. (2)

(b) How is conceptual data model different from Logical data model? (1)

20. How can you insert an image on a web page? Explain with an example. (2)

21. Write the HTML code to create the following (3)


A. Academic Courses
 English
 Hindi
 Maths
B. Vocational Courses
 Data Entry Operations
 Tourism
 Photography
22. Explain Font element with all its attributes. Give examples to support your answer. (3)

23. Explain the difference between = and == with respect to C++ (2)

24. Write the equivalent switch .. case statement for the following (2)
If (day==’1’)
cout<<”Good Day”;
else
if(day==’2’)
cout<<”Very Good Day”;
else
if (day==’3’)
cout<<”OK OK”;
4
else
cout<<”Night time”;

25. What will be the output of the following code (1)


for (int i=1; i<10; i++)
if (i==5)
break;
cout<<i;

26. Give one difference between getch() and getche() (1)


27. Differentiate between ios::app and ios::out (1)
28. Write a statement to move the input pointer in the file to the beginning of the file. (1)
29. Define primary key of a table. (1)

30. Write the HTML statements to change the color of the horizontal line. (1)
31. Write the HTML statements to set the background image as ABC.gif. (1)

You might also like