# DHSE Kerala 1st and 2nd Year Computer Science Question Papers

1. Arrange the following data types from smallest to largest
float, char, double, long double, long (1)
2. If p=1 , q=2, the value of X after executing the expression X= – – q + p (1)
3. If strlen() : string.h then ……… : ctype.h (1)
a) Column b) Attribute c) Field d) Tuple (1)
5. Distinguish between PRIMARY KEY and UNIQUE. (1)
6. Predict the output
enum day{Sunday, Monday, Tuesday=5,Wednesday};
day b_day;
b_day = Monday + Wednesday;
cout << b_day; (2)
OR
7. Assume that Time is a class. Distinguish between the following
statements:
Time ot1(13,20,36);
Time ot1 = Time(13,20,36); (2)
8. Explain nested structure with an example. (2)
9. Describe the importance of destructor. (2)
10. Represent the Boolean function F(a,b) = ab using only NOT and OR gates. (2)
11. Briefly explain the qualities that the System Analyst should possess. (2)
12. Ramu has to perform insertion, deletion and modification operation of records in a table. Name the type of database language which provides commands to perform these operations. Write short note on it. (2)
13. The function sum() can be used for adding two numbers as well as joining two strings. Which OOP feature can be correlated? Explain. (3)
14. Identify and correct the error.
Class X
{
public:
int a,b;
void int(void)
{
a=b=0;
}
int sum(void);
int square(void);
};
int sum(void)
{
return(a+b);
}
int square (void)
{
return sum()*sum();
} (3)
15. Given the following set of definition
class X
{………
};
class Y: public X
{
…….
};
class Z: public Y
{
…….
};
Z Ob1;
What order will the constructors and destructors be invoked in? (3)
OR
16. Predict the output and explain the procedure.
#include
#include
void calc(int ,int *);
void main()
{
int i=6;
int j=-4;
calc(i, &j);
cout<17. Name the logic circuit used to add 3 bits at a time. Draw the truth table and circuit diagram. (3)
18. System can be used for long periods if it was maintained properly. What are the different categories under which system maintenance can be classified? (3)
19. Consider two tables, Identify and explain the relational operation used in the following situation.
1. To combine the tuples of two tables (1)
2. To display the tuples which are common in both tables (1)
3. As far as a structure of a table is concerned, a condition should be
satisfied to perform these operations. What is it? (1)
20. Write a program to process and display the salary details of 100 employees using class. Basic_pay, da,hra, pf are given. (5)
21. What is function overloading? Use the concept of function overloading to compute area of rectangle, area of triangle, area of circle. (5)
22. Create a file to store and display the details of some students such as rollno, name and marks of three subjects. (5)
23. (a) Create a table Hospital with the following fields.
Pat_Id Integer Primary Key
Pat_Name Character(30)
Doc_Name Character(30)
Bill_Amt Number
(b) Insert data into the table.
(c) Display the number of patients treated by each doctor.
(d) Display details of patients treated by Dr. Naik.
(e) Display the names of patients whose bill amount is between 2000 and 5000
in alphabetical order. (5)
24. a) Based on traffic , explain different types of data communications. (3)
b) Match the communication devices with its application and give justification
Gateway Amplifies Signals
Repeater Converts signals
Bridge Connects different networks
Modem Connects two LANs (2)