COMPUTER SCEINCE
COMPUTER SCEINCE
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) Linear algebra
b) Arithmetic algebra
c) Switching algebra
d) Binary algebra
3) The output of 2 input AND gate is High (1) when
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
a) .
b) ::
c) ;
d) *
6) A. The inline function is a compact function
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) 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) Web hosting
b) Web scripting
II. Fill in the blanks choosing the appropriate word/words from those given in the bracket.
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.
• 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 )
[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.
[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
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.
<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.
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;
}; }
};
b. Multilevel inheritance: The classes can also be derived from the classes that are
already derived. This type of inheritance is called multilevel inheritance.
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.
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
*********
www.creativeedu.in
Phone No: 9019844492