The document contains 24 questions related to computer science topics like data types, operators, functions, classes, OOP concepts, databases, and data communication. The questions range from 1 to 5 marks and cover topics such as data types, operators, functions, classes, OOP concepts, databases, relational operations, and data communication devices. Students need to answer these questions to demonstrate their understanding of fundamental CS concepts.
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 ratings0% found this document useful (0 votes)
53 views
20 CS
The document contains 24 questions related to computer science topics like data types, operators, functions, classes, OOP concepts, databases, and data communication. The questions range from 1 to 5 marks and cover topics such as data types, operators, functions, classes, OOP concepts, databases, relational operations, and data communication devices. Students need to answer these questions to demonstrate their understanding of fundamental CS concepts.
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) 4. Pick the odd one out and justify your answer 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<iostream.h> #include<conio.h> void calc(int ,int *); void main() { int i=6; int j=-4; calc(i, &j); cout<<i<<’\n’<<j; } void calc(int x,int * y) { x=x*x; *y=*y*y; } (3) 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)