0% found this document useful (0 votes)
17 views16 pages

CS ModelPaper 1

The document consists of a series of questions and answers related to computer science concepts, covering topics such as data structures, database systems, object-oriented programming, and network topologies. It includes definitions, explanations, and examples, as well as SQL queries and C++ code snippets. The questions are categorized into different parts, each with varying mark allocations.

Uploaded by

sibyala15
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)
17 views16 pages

CS ModelPaper 1

The document consists of a series of questions and answers related to computer science concepts, covering topics such as data structures, database systems, object-oriented programming, and network topologies. It includes definitions, explanations, and examples, as well as SQL queries and C++ code snippets. The questions are categorized into different parts, each with varying mark allocations.

Uploaded by

sibyala15
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/ 16

PART-B

III Answer any FOUR questions. Each question carries TWO marks: 4 x 2 =8

21. Prove involution law

22. Realize AND using NOR gate.


23. Mention any two features of parameterized constructor.

 Parameterized constructors can be overloaded.


 Parameterized constructors can have default arguments and default
values.

24. Differentiate between read( ) and write( )

25. Write any two features of Database System.

Controlled Data Redundancy: This eliminates duplication of data and


saves the storage space.

Data sharing: The data stored in the database can be shared among
multiple users or application programs.

26. Explain any two logical operator in SQL.

27. Write the purpose of MAX() and MIN() group functions in SQL
PART-C

IV Answer any FOUR questions. Each question carries THREE marks:

4 x 3 = 12

28. Write a note on Cache memory

A cache memory is a high speed memory placed between RAM and

CPU. Cache memory is used to store most recently accessed data and

programs. Cache memory is very expensive.

Types of Cache Memory:

L1 (Level 1) is located in CPU.

L2 (Level 2) is located in motherboard.

L3 (Level 3) is Located on the mother board as a separate chip.

29. What is primitive data structure? Explain any two operations on primitive
data structure.

Data structure which is directly operated upon by machine-level instructions


is known as primitive data structure.

Create: create operation is used to create a new data structure. This

operation reserves memory space for the program elements.

Destroy: Destroy operation is used to destroy or remove the data


structures from the memory space.

30. Define array of pointer. Give suitable example.

31. Write the purpose of seek directions in C++ data file handling

seekg():

Move the get pointer to a specified location from the beginning of a file.

seekp():

Move the put pointer to a specified location from the beginning of a file.
32. Differentiate between manual and electronic data processing.

33. Identify the type of e-commerce in the following cases

i. Buying of goods by the distributer from the manufacturer.

Business-to-Business(B2B)

ii. Buying of goods from Amazon web site.

Business-to-Consumer(B2C)

iii. Buying of used car from a owner.

Consumer-to-Consumer(C2C)
34. Write HTML code to create the following table.
PART-D

V Answer any FOUR questions, each question carries Five marks:

4 x 5 = 20

35. Write an algorithm for enqueue operation.

36. Explain the operations on stack.

a) stack( ): Creates a new stack that is empty.

b) push(item): Adds a new item to the top of the stack.

c) pop( ): Removes the top item from the stack.

d) peek( ): Returns the top item from the stack.

e) isEmpty( ): Tests whether the stack is empty or not.

f) size( ): Returns the number of items on the stack.


37. Mention any three advantages and two disadvantages of OOP.

Advantages

a) The programs are modularized based on the principle of class and objects.

b) OOPs reduces code duplication.

c) Providing data security with data encapsulation.

d) Easier to develop complex software with inheritance.

e) Allows code reusability by linking code and object.

f) Reduces software development time.

Dis Advantages

There are no set standards for OOP.

To convert real life problem into OOP is difficult.

Difficult to adopt flow diagrams.

Classes are overly Generalized.

38. What is function overloading? Explain the need for function overloading.

When two or more functions have same name but differ in number
of arguments or data type of arguments is called function overloading.
The need for function overloading are:

 Code can be executed faster.


 Code maintenance is easy.
 It is easier to understand the flow of information and debug.
 Easier interface between programs and real world objects
 Eliminates the use of different function names.
39. Write the rules for constructor.

The following rules are used for writing a constructor function:

i) A constructor must have the same name as that of the class name.

ii) There is no return type for constructor (not even void).

iii) A constructor should be defined under public specifier.

iv) A constructor can have default arguments.

v) A constructor is invoked automatically when objects are created.

vi) It is not possible to refer to the address of the constructor.

40. What is inheritance? Explain Hierarchical and Multiple inheritance

Inheritance is the capability of one class to inherit properties from another


class.
41. Explain different network topologies.

Bus Topology

Bus topology is also known as Linear Topology. In this topology each node
attaches directly to a common cable which acts as the backbone onto which
the various nodes are attached.

Star Topology

In this topology each node is connected directly to the central computer.


All the communications between the nodes have to pass through central
computer.
Tree Topology

Tree topology is a combination of bus and star topology. The network looks
like an inverted tree with the central root branching and subbranching down
to the nodes.
Ring Topology

In ring topology, each host machine connects to exactly two other

machines, creating a circular network structure. When one host tries to

communicate or send message to a host which is not adjacent to it, the

data travels through all intermediate hosts.

Mesh Topology

In this topology, each node is connected to more than one node to

provide an alternative root in the case the host is either down or too

busy.

VI Answer any TWO questions, each question carries FIVE marks

2 x 5 = 10

42. Given the Boolean function F(A,B,C, D) =∑(0,2,6,7,8,9,10,11,13 ),

Reduce it using K-map.


43. Define a class time with following members and conditions

i. Data members : hour, minute, seconds

ii. Member functions: getdata() and output()

iii. Define member functions inside the class to input and output hour,
minute

and seconds.

#include<iostream.h>
#include<conio.h>
class Time
{
private:
int hour,minute,seconds;
public:
void getdata()
{
cout<<Enter the values for hour minute and seconds<<endl;
cin>>hour>>minute>>seconds;
}

void output()
{
cout<<"Hours: "<<hour<<endl;
cout<<"Minute: "<<minute<<endl;
cout<<"Seconds: "<<second;
}
};
void main()
{
Time X;
clrscr();
X.getdata();
X.output();
getch();
}

44. Write the SQL query for the following questions based on given
employee table

i) Develop the table with above fields

ii) Display the structure of the table

iii) Find total number of employees

iv) Find the sum of all employee’s salary

v) Display all employee records with age>=15

i) create table employee(empid number(3),

name varchar2(20),

age number(2),

salary number(5));
ii)desc employee;

iii) select count(*) from empoyee;

iv) select sum(salary) from employee;

v) select * from employee where age>=15;

*****

You might also like