0% found this document useful (0 votes)
5 views

COMPUTER SCEINCE

The document is an examination question paper divided into five parts (A, B, C, D, and E) covering various topics in computer science, including Boolean algebra, data structures, object-oriented programming, and SQL commands. Each part consists of multiple-choice questions, fill-in-the-blanks, short answer questions, and longer descriptive questions. The paper assesses students' understanding of fundamental concepts and practical applications in the field.

Uploaded by

uthpalwww
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)
5 views

COMPUTER SCEINCE

The document is an examination question paper divided into five parts (A, B, C, D, and E) covering various topics in computer science, including Boolean algebra, data structures, object-oriented programming, and SQL commands. Each part consists of multiple-choice questions, fill-in-the-blanks, short answer questions, and longer descriptive questions. The paper assesses students' understanding of fundamental concepts and practical applications in the field.

Uploaded by

uthpalwww
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/ 13

Instructions:

1. The question paper has five parts namely A, B, C, D and E. Answer all the five parts.
2. For part -A Questions only the first written answers will be considered for evaluation.
PART-A
I. Answer all questions. Each question carries 1 mark. (20 X 1= 20)
1) Where is L1 cache located?

a) Inside the CPU


b) Outside the CPU
c) Inside the ALU
d) In the ROM
2) Boolean Algebra is also called_______

a) Linear algebra
b) Arithmetic algebra
c) Switching algebra
d) Binary algebra
3) The output of 2 input AND gate is High (1) when

a) One of the input is high


b) Both the inputs are high
c) Both the inputs are low
d) None of the above
4) Assertion (A) : A stack is a LIFO data structure.

Reasoning (R) : An ordered collection of items where insertion and deletion takes place at
different ends.
a) A is true , R is false
b) A is true, and R is correct explanation of A
c) A is false, R is false
d) None of the above

HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI


5) _________ Operator is used to define member function outside the class.

a) .
b) ::
c) ;
d) *
6) A. The inline function is a compact function

B. Inline function runs faster than normal function.


C. Using inline function efficient code can be generated.
a) A is correct but B is wrong
b) A is wrong but C is correct
c) B is wrong and C is wrong
d) All A, B, C are correct
7) Constructor should be declared in ________

a) Private
b) Public
c) Protected
d) Local
8) If a number of classes are derived from a single base class is called _______

a) Single inheritance
b) Multiple inheritance
c) Multi-level inheritance
d) Hierarchical inheritance
9) In the given program segment identify the error

void main()
{
int *ptr, x=18;
ptr=*x;
cout<<”\n output is”<<ptr;
}
a) Unkown identifier
b) Runtime error
HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI
c) Invalid indirection
d) Statement missing
10) An example for DBMS software is

a) ORACLE
b) C++
c) HTML
d) MS word
11) Name the SQL command used to change the existing data of the table.

a) ALTER
b) UPDATE
c) SELECT
d) DELETE
12) MAN stands for

a) Metropolitan Area Network


b) Metro station Area Network
c) Modern area network
d) Middle Allocation Network
13) A communication mode that transmits the data in both directions, but only one direction at a time.

a) Simplex
b) Semi duplex
c) Half duplex
d) Full duplex
14) Software whose source code is available to customers and it can be modified and redistributed
without any limitation is _______

a) Open Source Software


b) Community software
c) Free Software
d) Free ware
15) Which of the following is process of creating and embedding scripts in a web page?

a) Web hosting
b) Web scripting

HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI


c) Domain registration
d) Server side script

II. Fill in the blanks choosing the appropriate word/words from those given in the bracket.

(Domain, Information, Tree, Data mining, Record, Primary key)


16) Information is processed data with definite meaning.
17) A single entry in a table is a called as Record
18) Hierarchical model organizes the data in a Tree like structure.
19) Primary key uniquely identifies each record in a table.
20) Data mining is concerned with analysis and picking out relevant information.
PART-B
III. Answer any Four questions. Each question carries 2 marks. (4 X 2= 8)

21) State Idempotence law.


This law states that when a variable is combined with itself using OR or AND operator,
the output is the same variable.
i.e X+X=X
X. X=X

22) What is Tautology and Fallacy?


If the result of any logical expression is always TRUE (1) is called Tautology.
If the result of any logical expression is always FALSE (0) is called Fallacy.

23) Define any two characteristics of Object-Oriented Programming.


[Any two]
Object: An object is a collection of data member and associated member functions.
Class: Class is a way of grouping objects having similar characteristics.
Data abstraction :Data abstraction is the process of representing essential features
without including background detail.
Data encapsulation: Data encapsulation combines data and functions into a single unit
called class.
Inheritance: The process of forming a new class from an existing class is known as
inheritance.
Polymorphism The ability of an operator and function to take multiple form is known as
polymorphism.

24) What is constructor? Mention its types.


A constructor is a special member function that is used in classes to initialize the objects of
a class automatically.

HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI


Types of constructors:
Default constructor, Parameterized constructor and Copy constructor.

25) Mention any two functions that belong of ofstream class


[Any two]
put( ),write( ),seekp( ) , tellp( )

26) Define candidate key and alternate (secondary) key.

Primary Key: A key which is eligible to become the primary key is called candidate key.
Alternate Key: The Alternate keys of any table are simply those candidate keys which
are not currently selected as the primary key.

27) Write the syntax and example for DROP command in SQL.

Syntax: DROP table table name;


Example: DROP table student;

28) Briefly explain with neat diagram the star topology.

• This topology consists of a central node to which all other nodes are directly connected
by a single path.
• Here each node is connected directly to the central hub.
• All communications between the nodes have to pass through the central hub.

PART-C
IV. Answer any four questions. Each question carries 3 marks. ( 4 X 3= 12 )

29) Give any three features of USB port.


• Universal Serial Bus port is used to connect a variety of external devices like printers,
scanners, pendrive, speakers etc. to a computer. It supports up to 127 devices.
• USB supports a data speed of 12 megabits per second.
• USB is a plug-and-play interface i.e. a new device can be added to the computer
without turning it off.

HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI


30) Write the logic symbol and truth table of OR gate.

31) What are the application of stack data structure?

[Any Three]
• It is used to reverse a word.
• “Undo” mechanism in text editor.
• Backtracking: This is a process when you need to access the most recent data element
in a series of elements. Once you reach a dead end, you must backtrack.
• Conversion of decimal number to binary.
• Conversion of infix expression into prefix and postfix.
• Quick sort.
• Runtime memory management.

32) Define array of pointers. Give an example.


Array of pointer is an array which stores collection of addresses.
Example:
int *p[3];
int a=6,b=8,c=4;
p[0]=&a; //*p[0]=6
p[1]=&b; //*p[1]=8
p[2]=&c; //*p[2]=4

33) Explain any three file opening modes.

[Any Three]
File mode Meaning Stream type
parameter
ios::app Append to end Ofstream
of file
ios::in Open file for Ifstream
reading only
ios::out Open file for Ofstream
writing only
ios::binary Opening a ifstream,ofstream
binary file

34) Briefly explain any three components of ER diagram.

a. Entity:
HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI
• An Entity can be any object,place,person or class.
• In E-R Diagram, an entity is represented using rectangles.
Student

b. Attribute:
• An Attribute describes a property or characteristic of an entity.
• Attributes are represented by means of eclipses.
• For example, Roll_No,Name and Birth date can be attributes of a student.

c. Relationship:
• A relationship type is a meaningful association between entity types.
• Relationship is represented using diamond shaped box.

35) What is E-Commerce? Mention any two technologies and services used in E-Commerce.
It is the trade of goods and services with the help of telecommunication and computers.
Technologies / services E- commerce:
[Any two]
• Electronic mail (e-mail).
• E-banking / Net banking.
• Electronic fund transfer (EFT).
• Electronic data interchange.
• Digital cash, smart cards, security services etc.

36) Explain the structure of HTML

<HTML>
<HEAD>
<TITLE> ---------- </TITLE>
</HEAD>
<BODY> ----------
----------
</BODY>
</HTML>

<HTML> tag marks the beginning of the HTML and </HTML> tag marks the end of
HTML document. <HEAD> tag begins the head section of the HTML document and
</HEAD> tag defines the end of the heading. The <TITLE> tag gives title to HTML
document that appears on browser title bar. <BODY> tag defines the body of HTML
document.

HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI


37) Explain any five operations performed on linear data structure.
1. Traversing: The processing of accessing each element exactly once to perform some
operation is called traversing.
2. Insertion: The process of adding a new element into the given collection of data
elements is called insertion.
3. Deletion: The process of removing an existing data element from the given collection
of data elements is called deletion.
4. Searching: The process of finding the location of a data element in the given
collection of data elements is called as searching.
5. Sorting: The process of arrangement of data elements in ascending or descending
order is called sorting.

38) Write an algorithm to delete a data element from the queue.


Step 1: IF FRONT =NULL then
PRINT "QUEUE IS EMPTY"
EXIT
[End of if ]
Step 2: ITEM = QUEUE[FRONT]
Step 3: IF FRONT = REAR THEN
FRONT = NULL
REAR = NULL
ELSE
FRONT = FRONT + 1
[End of if ]
Step 4: RETURN

39) Explain any five applications of OOP’s.


[Any Five]
• CAD/ CAM Software.
• Computer graphic applications.
• Object -Oriented Database.
• Real-time systems.
• Artificial intelligence and expert systems.
• User Interface design such as windows.

40) What is friend function? Mention its various characteristics.


A non-member function of a class that has access to both private and protected
members of a class.
characteristics of friend function
[Any Four]
• A friend function is a non-member function which can access both private and
protected members of a class.
• It can be declared anywhere in the class definition, because it is not affected by
access specifiers.
HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI
• The function is declared with keyword friend.
• While defining friend function it does not use either keyword friend or :: operator.
• A friend function can be invoked like normal function without help of any objects.
• It cannot access the member variables directly and has to use an object name and
dot operator(.) with each member name.

41) Define default constructor. Write the features, syntax and example of default constructor.
A constructor which does not take any argument is called a default constructor.
[Any Two]
Features:
• For every object created, the default constructor is automatically called.
• All objects of a class are initialized to same set of values by the default constructor.
• If different objects are to be initialized with different values, it cannot be done using
default constructor.

Syntax Example
class classname class sum
{ {
public: int a,b;
classname( ) public :
sum( )
{
{
body of the constructor
a=0;
} b=0;
}; }
};

42) What is inheritance? Explain with neat diagram.


a) multiple inheritance
b) multilevel inheritance
Inheritance is the capability of one class to inherit properties from another class.
a. Multiple inheritance: If a class is derived from more than one base class then it is
called as multiple inheritance.

b. Multilevel inheritance: The classes can also be derived from the classes that are
already derived. This type of inheritance is called multilevel inheritance.

HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI


b. Multiple inheritance: If a class is derived from more than one base class then it is called
as multiple inheritance.

43) Differentiate between manual and electronic data processing.


[Any Five]
Manual Data Processing Computerized/Electronic
Data Processing

Entire process takes place manually. Entire process takes place by the machine.

The volume of the data, which can be The volume of data which can be
processed, is limited. processed is large.
It requires large quantity of papers. Less amount of papers are used.
The speed and accuracy is less. High speed and greater accuracy.
Labor cost is high. Labor cost is economical.
Storage medium is Secondary storage
Storage medium is paper.
medium.
Data can be transferred (soft copy)
Data transfer is difficult.
easily through computer networks.
44) What is computer virus? Write the symptoms (characteristics) of computer virus.
Computer Virus is a malicious program that can spread from computer to computer and they
can replicate themselves
symptoms (characteristics) of a computer virus.
[Any Four]
• Computer may respond slowly.
• Disk drivers may become inaccessible.
• It creates multiple/duplicate files.
• Unusual error message.
• Computer reboots on its own.
• Applications may not work normally.

HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI


PART – E
V. Answer any two questions. Each question carries 5 marks. (2x5=10)
45. Given the Boolean Function F (A,B,C, D) = Ʃ ( 0, 1, 2, 3, 4, 7, 8, 12, 15) reduce it by
using Karnaugh map (K-map).

Reduced expression for Quad 1: AB

Reduced expression for Quad 2: CD

Reduced expression for Pair 1: BCD

Final reduced SOP expression AB + CD + BCD

46) Explain member function defined outside the class definition with a suitable example.

• Member functions declared within a class must be defined separately outside the
class.
• The definition of a member function is similar to the normal function, but it has an
identity label in the header which tells the compiler which class the member function
belongs to.
• The scope resolution operator(::) is used to define a function outside the class
defination.
Syntax:
return_type_specifier classname :: function_name (arguments)
{
function body
}
Programming Example:
#include<iostream.h>
#include<conio.h>
class sum
{
private:
int a,b;
public:
void input( );
void output( );
};
HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI
void sum::input( )
{
cout<<”Enter two number”;
cin>>a>>b;
}
void sum::output( )
{
cout<<" The sum is=”<<a+b;
}
void main( )
{
sum s;
s.input( );
s.output( );
getch( );
}

47) With reference to the table given below, write the SQL commands to perform
following operations.
Table Name: employee

a) Display all the records from “employee” table.


Select * from employee;
b) Find the maximum of Net salary.
Select Max(Net_Salary) from employee;
c) Find the minimum of Net salary.
Select Min(Net_Salary) from employee;
d) Delete all the records from the table “employee”.
Delete from employee;
e) Remove the table “employee”.
Drop table employee;

*********

HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI


DEPARTMENT OF COMPUTER SCIENCE
CREATIVE EDUCATION FOUNDATION KARKALA
➢ Mr. Jnanesh Kotian
➢ Mr. Pratheek Kumar
➢ Mr. Mahesh Kumar C
➢ Mr. Sujan J
➢ Mrs. Manisha B.M
➢ Mrs. Megha N
➢ Mrs. Geetha Prasad
➢ Ms. Shilpa Alva

www.creativeedu.in
Phone No: 9019844492

HKS P U COLLEGE, HASSAN CREATIVE P U COLLEGE, KARKALA CREATIVE P U COLLEGE UDUPI

You might also like