Sample Question Paper Final Cs 330
Sample Question Paper Final Cs 330
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.
#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:
Write a C++ statement to accept the value of Locality form the user.
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
#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)
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();
};
char []getdept()
{returnDept;}
};
(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)
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”;
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)