100% found this document useful (1 vote)
2K views59 pages

All MCQ

mcq computer scince

Uploaded by

THANGAMARI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views59 pages

All MCQ

mcq computer scince

Uploaded by

THANGAMARI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 59

past Paper 2000

(B) Please choose the most appropriate answer from the given set of answers to fill the blanks.
11. During the program execution, temporary/intermediate values are stored in _____________.
a. Registers
b. Peripherals
c. LAN
d. None of these
12. The objects can be inherited by _____________.
a. A single object only
b. Multiple objects
c. Both (a) and (b)
d. Either (a) or (a)
13. The operating system may perform _____________ operation to manage the memory while running a large
program.
a. Sorting
b. Scheduling
c. Paging
d. None of these
14. When the LAN is arranged in such a way that each computer is connected directly to the HUB the
configuration can be termed as _____________ network.
a. Bus
b. Star
c. Ring
d. None of these
15. To communicate with other computers over a telephone line the computer must have _____________
installed.
a. Telephone set
b. Modem
c. LAN Card
d. None of these
16. When each item of data in a database is directly linked with every other item of data, the database is called
_____________.
a. Relational
b. Hierarchical
c. Network
d. None of these
17. _____________ is the most efficient method to reduce the duplication of data.
a. Duplication
c. Normalisation
c. Empty fields
d. None of these
18. The _____________ operation changes the coordinate values of objects being displayed.
a. Transformation
b. Windowing
c. Both (a) and (b)
d. None of these
19. A linear sequential software development model is also referred to as ____________ .
a. Prototype Model
b. RAD Model
c. Spiral Model
d. None of these
20. State Transition Diagram gives information of ___________.
a. Data Flow
b. Entry Relationship
c. Control Flow
d. None of these
Paper 2002
8. (A) Write only True or False in the Answer Book. Do not reproduce the questions.
(1) The terms type cast and type conversion have different semantics i.e. they have different effects on the
program execution.TRUE
(2) Alignment restrictions of modern RISC-architectures forces compilers to occasionally introduce holes and
padding for record structures to ensure efficient access of record elements.
(3) In a language with garbage collection, the programmer need not worry about heap memory
management.True

(4) In order to execute a program by interpretive execution, the interpreter needs to execute on the system on
which the program is to be run.
(5) A GUI is a Graphical Utility Interface. False
(6) The study of algorithms began in the 1900s when electronic computers began to be used.
(7) A bus is a part of the computer that decides if a value should be stored as an integer or floating point.False
(8) Peripheral devices handle the coordination of a computers activities. True
(9) Get method in HTML forms is used for debugging.False
(10) Pine is an example of e-mail utility. TRue
(B) Please choose the most appropriate answer from the given set of answers.
(11) State Transition Diagram gives information of
(a) Prototype Model
(b) RAD Model
(c) Spiral Model
(d) None of these
(12) The concept of meaning represented by an algorithm is known as its:
(a) Control Structure
(b) Sequence
(c) Semantics
(d) Syntax
(13) Each cell of memory is numbered and that number is referred to as the cells
(a) Block
(b) Identity
(c) Address
(d) Size
(14) Main memory is called RAM because
(a) It is volatile, like a rams temper.
(b) The computer starts at address 0 and reads every byte until it reaches the correct address.
(c) It can Read all memory
(d) The memory is accessible randomly
(15) To use internet, the computer must have
(a) Telephone
(b) Modem
(c) ISP Connection
(d) All of the above

2003
8--(A) Write only True or False in the Answer Book. Do not reproduce the question. (1x10)
(1) A feature of an operating system that allows more than one program to run simultaneously is called
Multitasking. Flase
(2) A trackball operates like a joystick on its back. It is extremely useful when there isn't enough space to use a
mouse,False
(3) Digitizing Tablet is a'special Input device that is mainly used to digitize vector-oriented design or
pictures. True not completely sure
(4) Dedicated line is a high speed cable line that is not permanently wired into the internet.
(5) A Router is a network device that helps LANs and WANs achieve interoperability and connectivity and thai
can link LANs that have different netwoik topdldgies, such as Ethernet and Token Ring. true
(6) Internet Protocol is a routable protocol in the backbone that is responsible for IP addressing, routing, and the
fragmentation and reassembly of IP packets. True
(7) Telnet is an Internet connection that enables a user to terminate an active connection with a computer at a
retoete site.
(8) ESD stands for Electronic Static Distance.False
(9) IRQ is Interrupt Request. TRue
(10) Copyright computer programs made available on trial basis are called shareware. True
(B) Please choose^he most appropriate answer from the given set of answers. . (.1x5)
(11) What is the long form of 'CMOS'?
(a) Complimentary Metal Oxide Semiconductor
(b) Complex Metal Oxide Semiconductor
(c) Controller Metal Oxide Semiconductor
(d) Complimentary Metal Oxide Sets.
(12) What is a Y-Connector? '
(a) A'Y-Shaped splitter cable that divides a source input into two output signals.
(b) A Y-Shaped splitter connector that divides a source input into two output signals.
(c) A Y-Shaped splitter card that divides'a source input into two output signals.
(d) None of the above.
(13) What do you mean by IBM-Compatible'?

(a) A computer that has a processor that is compatible vvith the original IBM PC.
(b) A computer that has a processor that is similar to original IBM PC
(c) A computer that has a casing that is similar original IBM PC.
(d) None of the above
(14) What do you mean by "virtual? Select'all that apply:
(a) In general, it distinguishes something that is merely conceptual from something that has physical reality,
(b) Real
(c) Not real.
(d) None of the above
(15) Select correct statement describing a term 'stateless'?
(a) Having all information about what occurred previously
(b) Having some information aboot what occurred previously
(c) Having no information about what occurred previously
(d) Having new information about what occurred previously
2004
i) When all access and processing is done in one location, a computer system is said to be
(a) networked
(b) distributed
(c) centralized
(d) linked
(ii) Tools to change PROM chips, called
(a) chip kits
(b) RAM burners
(c) PROM burners
(d) none of
these
(iii) The type of modulation that changes the height of the single is called (a) frequency
(b) phase
(c) amplitude
(d) prophase
(iv) A connection for similar network:
(a) satellite
(b) bridge
(c) gateway
(d) fax
(v) The technology whereby part of the program is stored on disk and is brought into memory for execution as
needed is called
(a) memory allocation
(b) virtual storage
(c) interrupts
(d) prioritized memory
(C) Write '"True" or "False" in your answer book about the following statements: (5)
(i) Application software may be either custom or packaged. True
(ii) RISC technology uses more instructions than traditional computers.True
(iii) A ring network has no central host computer.True
(iv) Satellites use line-of-sight transmission.False
(v) Time-sharing is both event-driven and time-drive

2005
8. (A) For whom the following abbreviations stand for
(i) DNS : Domain Name System
(ii) CMOS : Complementary metaloxidesemiconductor
(iii) OSI : Open Systems Interconnection
(iv) CASE : Computer Aided Software engineering
(v) DDE
(B) Fill in the blanks with the most suitable options for the following statements:
(i) A data path to transfer data is calledPhysical medium (not sure)
(ii) What is combination of I-time and E-time called.............................Machine Cycle
(iii) The process of applying a formula to a key is called.
(iv) Distortion in the received signals is called
(v) DMA is a technique to transfer data between memory and ..IO devices
(C) Write TRUE or FALSE
(i) RISC technology used fewer instructions then traditional computers. True
(ii) Direct file organization is combination of sequential and indexed file organization.True

(iii) Fax is a connection of similar networks. True not sure


(iv) Let G=(V,E) be an undirected graph when G is a free tree.True
(v) An entity instance is a single occurrence of an entity True

Toc
Three address code involves
Exactly 3 address
At most most 3 address
No unary operators
None of these
______________________________________________________________________________
_______
An intermediate code form is
Postfix notation
Syntax trees
Three address code
All of these
______________________________________________________________________________
_______
In operator precedence parsing , precedence relations are defoned
For all pair of non terminals
For all pair of terminals
To delimit the handle
Only for a certain pair of terminals
______________________________________________________________________________
_______
Relocating bits used by relocating loader are specified by
Relocating loader itself
Linker
Assembler
Macro processor
______________________________________________________________________________
_______

A compiler for a high level language that runs on one machine and produce code for different
machine is called
Optimizing compiler
One pass compiler
Cross compiler
Multipass compiler
______________________________________________________________________________
_______
Synthesized attribute can be easily simulated by a
LL grammar
Ambiguous grammar
LR grammar
None of the above
______________________________________________________________________________
_______
The output of a lexical analyzer is
Machine code
Intermediate code
A stream of tokens
A parse tree
______________________________________________________________________________
_______
Running time of a program depends on
The way the registers and addressing modes are used
The order in which computations are performed
The usage of machine idioms
All of these
______________________________________________________________________________
_______
Reduction in strength means
Replacing run time computation by compile time computation
Removing loop invariant computation
Removing common sub expression
Replacing a costly operation by a relatively cheaper one
______________________________________________________________________________
_______

_________or scanning is the process where the stream of characters making up the source
program is read from left to right and grouped into tokens.
Lexical analysis
Diversion
Modeling
None of the above
______________________________________________________________________________
_______
Task of the lexical analysis
To parse the source program into the basic elements or tokens of the language
To build a literal table and an identifier table
To build a uniform symbol table
All of these
______________________________________________________________________________
_______
Shift reduce parsers are
Top down parser
Bottom up parser
May be top down or bottom up parser
None of the above
______________________________________________________________________________
_______
Any description error can be repaired by
Insertion alone
Deletion alone
Insertion and deletion alone
Replacement alone
______________________________________________________________________________
_______
The linker
is similar to interpreter
uses source code as its input
is required to create a load module
none of the above
______________________________________________________________________________
_______

A grammar that produces more than one parse tree for some sentence is called
Ambiguous
Unambiguous
Regular
None of these
______________________________________________________________________________
_______
In an absolute loading scheme which loader function is accomplished by assembler ?
re-allocation
allocation
linking
loading
______________________________________________________________________________
_______
Intermediate code generation phase gets input from
Lexical analyzer
Syntax analyzer
Semantic analyzer
Error handling
______________________________________________________________________________
_______
We can optimize code by
Dead code elimination
Common subprograms
Copy intermediate loop
Loop declaration
______________________________________________________________________________
_______
Code can be optimized at
Source from user
Target code
Intermediate code
All of the above
______________________________________________________________________________
_______

Whether a given pattern constitutes a token or not depends on the


Source language
Target language
Compiler
All of these
______________________________________________________________________________
_______
YACC builds up
SLR parsing table
Canonical LR parsing table
LALR parsing table
None of the above
______________________________________________________________________________
_______
Type checking is normally done during
Lexical analysis
Syntax analysis
Syntax directed translation
Code optimization
______________________________________________________________________________
_______
A top down parser generates
Right most derivation
Right most derivation in reverse
Left most derivation
Left most derivation in reverse
______________________________________________________________________________
_______
Which of the following does not interrupt a running process?
A device
Timer
Scheduler
Power failure
______________________________________________________________________________
_______

In an absolute loading scheme, which loader function is accomplished by a loader ?


Re-allocation
Allocation
Linking
Loading
______________________________________________________________________________
_______
The lexical analyzer takes_________as input and produces a stream of_______as output.
Source program,tokens
Token,source program
Either A and B
None of the above
______________________________________________________________________________
_______
Which of the following can be accessed by transfer vector approach of linking?
External data segments
External subroutines
Data located in other procedure
All of these
______________________________________________________________________________
_______
___________is a graph representation of a derivation.
The parse tree
The oct tree
The binary tree
None of the above
______________________________________________________________________________
_______
The optimization which avoids test at every iteration is
Loop unrolling
Loop jamming
Constant folding
None of these
______________________________________________________________________________
_______

Syntax directed translation scheme is desirable because


It is based on the syntax
Its description is independent of any implementation
It is easy to modify
All of these
______________________________________________________________________________
_______
A parser with the valid prefix property is advantageous because it
Detects error as soon as possible
Detects errors as and when they occur
Limits the amount of erroneous output passed to the text phase
All of these
______________________________________________________________________________
_______
Which of the following parser is most powerful?
Operator precedence
Canonical LR
LALR
SLR
______________________________________________________________________________
_______
Inherited attribute is a natural choice in
Keeping track of variable declaration
Checking for the correct use of L values and R values
Both A and B
None of these
______________________________________________________________________________
_______
Macro-processors are ______
Hardware
Compiler
Registers
None of the above
______________________________________________________________________________
_______

In which way(s) a macroprocessor for assembly language can be implemented ?


Independent two-pass processor
Independent one-pass processor
Expand macrocalls and substitute arguments
All of the above
______________________________________________________________________________
_______
Macro in an assembly level program is _______.
sub program
a complete program
a hardware portion
relative coding
______________________________________________________________________________
_______
The optimization technique which is typically applied on loops is
Removal of invariant computation
Peephole optimization
Constant folding
All of these
______________________________________________________________________________
_______
Concept which can be used to identify loops is
Dominators
Reducible graphs
Depth first ordering
All of these
______________________________________________________________________________
_______
Local and loop optimization in turn provide motivation for
Data flow analysis
Constant folding
Pee hole optimization
DFA and constant folding
______________________________________________________________________________
_______

LR stands for
Left to right
Left to right reduction
Right to left
Left to right and right most derivation in reverse
______________________________________________________________________________
_______
Grammar of the programming is checked at ________ phase of compiler.
semantic analysis
code generation
syntax analysis
code optimization
______________________________________________________________________________
_______
Which of the following is not an intermediate code form?
Postfix notation
Syntax trees
Three address codes
Quadruples
______________________________________________________________________________
_______
A compiler that runs on one machine and produces code for a different machine is called
Cross compilation
One pass compilation
Two pass compilation
None of the above
______________________________________________________________________________
_______
The graph that shows basic blocks and their successor relationship is called
DAG
Flow chart
Control graph
Hamiltonian graph
______________________________________________________________________________
_______

A grammar is meaningless
If terminal set and non terminal set are not disjoint
If left hand side of a production is a single terminal
If left hand side of a production has no non terminal
All of these
______________________________________________________________________________
_______
Which of the following is used for grouping of characters into tokens?
Parser
Code optimization
Code generator
Lexical analyzer
______________________________________________________________________________
_______
An optimizer compiler
Is optimized to occupy less space
Is optimized to take less time for execution
Optimizes the code
None of these
______________________________________________________________________________
_______
Pee hole optimization
Loop optimization
Local optimization
Constant folding
Data flow analysis
______________________________________________________________________________
_______
The action of parsing the source program into proper syntactic classes is called
Syntax analysis
Lexical analysis
Interpretation analysis
General syntax analysis

Ds

Set - 1

1. Two main measures for the efficiency of an algorithm are


a. Processor and memory
b. Complexity and capacity
c. Time and space
d. Data and space
Collection on http://www.cs-mcqs.blogspot.com

2. The time factor when determining the efficiency of algorithm is measured by


a. Counting microseconds
b. Counting the number of key operations
c. Counting the number of statements
d. Counting the kilobytes of algorithm
Collection on http://www.cs-mcqs.blogspot.com
3. The space factor when determining the efficiency of algorithm is measured by
a. Counting the maximum memory needed by the algorithm
b. Counting the minimum memory needed by the algorithm
c. Counting the average memory needed by the algorithm
d. Counting the maximum disk space needed by the algorithm
Collection on http://www.cs-mcqs.blogspot.com
4. Which of the following case does not exist in complexity theory
a. Best case
b. Worst case
c. Average case
d. Null case
Collection on http://www.cs-mcqs.blogspot.com
5. The Worst case occur in linear search algorithm when
a. Item is somewhere in the middle of the array
b. Item is not in the array at all
c. Item is the last element in the array
d. Item is the last element in the array or is not there at all
Collection on http://www.cs-mcqs.blogspot.com
6. The Average case occur in linear search algorithm

a. When Item is somewhere in the middle of the array


b. When Item is not in the array at all
c. When Item is the last element in the array
d. When Item is the last element in the array or is not there at all
Collection on http://www.cs-mcqs.blogspot.com
7. The complexity of the average case of an algorithm is
a. Much more complicated to analyze than that of worst case
b. Much more simpler to analyze than that of worst case
c. Sometimes more complicated and some other times simpler than that of worst case
d. None or above
Collection on http://www.cs-mcqs.blogspot.com
8. The complexity of linear search algorithm is
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
Collection on http://www.cs-mcqs.blogspot.com
9. The complexity of Binary search algorithm is
a. O(n)
b. O(log )
c. O(n2)
d. O(n log n)
Collection on http://www.cs-mcqs.blogspot.com
10. The complexity of Bubble sort algorithm is
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
Collection on http://www.cs-mcqs.blogspot.com
11. The complexity of merge sort algorithm is
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
Collection on http://www.cs-mcqs.blogspot.com
12. The indirect change of the values of a variable in one module by another module is called
a. internal change

b. inter-module change
c. side effect
d. side-module update
Collection on http://www.cs-mcqs.blogspot.com
13. Which of the following data structure is not linear data structure?
a. Arrays
b. Linked lists
c. Both of above
d. None of above
Collection on http://www.cs-mcqs.blogspot.com
14. Which of the following data structure is linear data structure?
a. Trees
b. Graphs
c. Arrays
d. None of above
Collection on http://www.cs-mcqs.blogspot.com
15. The operation of processing each element in the list is known as
a. Sorting
b. Merging
c. Inserting
d. Traversal
Collection on http://www.cs-mcqs.blogspot.com
16. Finding the location of the element with a given value is:
a. Traversal
b. Search
c. Sort
d. None of above
Collection on http://www.cs-mcqs.blogspot.com
17. Arrays are best data structures
a. for relatively permanent collections of data
b. for the size of the structure and the data in the structure are constantly changing
c. for both of above situation
d. for none of above situation
Collection on http://www.cs-mcqs.blogspot.com
18. Linked lists are best suited
a. for relatively permanent collections of data
b. for the size of the structure and the data in the structure are constantly changing

c. for both of above situation


d. for none of above situation
Collection on http://www.cs-mcqs.blogspot.com
19. Each array declaration need not give, implicitly or explicitly, the information about
a. the name of array
b. the data type of array
c. the first data from the set to be stored
d. the index set of the array
Collection on http://www.cs-mcqs.blogspot.com
20. The elements of an array are stored successively in memory cells because
a. by this way computer can keep track only the address of the first element and the addresses of
other elements can be calculated
b. the architecture of computer memory does not allow arrays to store other than serially
c. both of above
d. none of above
Collection on http://www.cs-mcqs.blogspot.com

Answers
1. Two main measures for the efficiency of an algorithm are
c. Time and space
2. The time factor when determining the efficiency of algorithm is measured by
b. Counting the number of key operations
3. The space factor when determining the efficiency of algorithm is measured by
a. Counting the maximum memory needed by the algorithm
4. Which of the following case does not exist in complexity theory
d. Null case
5. The Worst case occur in linear search algorithm when
d. Item is the last element in the array or is not there at all
6. The Average case occur in linear search algorithm
a. When Item is somewhere in the middle of the array
7. The complexity of the average case of an algorithm is
a. Much more complicated to analyze than that of worst case
8. The complexity of linear search algorithm is
a. O(n)
9. The complexity of Binary search algorithm is
b. O(log n)
10. The complexity of Bubble sort algorithm is

c. O(n2)
11. The complexity of merge sort algorithm is
d. O(n log n)
12. The indirect change of the values of a variable in one module by another module is called
c. side effect
13. Which of the following data structure is not linear data structure?
d. None of above
14. Which of the following data structure is linear data structure?
c. Arrays
15. The operation of processing each element in the list is known as
d. Traversal
16. Finding the location of the element with a given value is:
b. Search
17. Arrays are best data structures
a. for relatively permanent collections of data
18. Linked lists are best suited
b. for the size of the structure and the data in the structure are constantly changing
19. Each array declaration need not give, implicitly or explicitly, the information about
c. the first data from the set to be stored
20. The elements of an array are stored successively in memory cells because
a. by this way computer can keep track only the address of the first element and the
addresses of other elements can be calculated

Set - 2
1. The memory address of the first element of an array is called
a. floor address
b. foundation address
c. first address
d. base address
2. The memory address of fifth element of an array can be calculated by the formula
a. LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words
per memory cell for the array
b. LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of
words per memory cell for the array
c. LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of
words per memory cell for the array
d. None of above
3. Which of the following data structures are indexed structures?
a. linear arrays
b. linked lists
c. both of above
d. none of above
4. Which of the following is not the required condition for binary search algorithm?

a. The list must be sorted


b. there should be the direct access to the middle element in any sublist
c. There must be mechanism to delete and/or insert elements in list
d. none of above
5. Which of the following is not a limitation of binary search algorithm?
a. must use a sorted array
b. requirement of sorted array is expensive when a lot of insertion and deletions are
needed
c. there must be a mechanism to access middle element directly
d. binary search algorithm is not efficient when the data elements are more than
1000.
6. Two dimensional arrays are also called
a. tables arrays
b. matrix arrays
c. both of above
d. none of above
7. A variable P is called pointer if
a. P contains the address of an element in DATA.
b. P points to the address of first element in DATA
c. P can store only memory addresses
d. P contain the DATA and the address of DATA
8. Which of the following data structure can't store the non-homogeneous data
elements?
a. Arrays
b. Records
c. Pointers
d. None
9. Which of the following data structure store the homogeneous data elements?
a. Arrays
b. Records
c. Pointers
d. None
10. Each data item in a record may be a group item composed of sub-items; those items
which are indecomposable are called
a. elementary items
b. atoms
c. scalars
d. all of above
11. The difference between linear array and a record is
a. An array is suitable for homogeneous data but hte data items in a record may have
different data type
b. In a record, there may not be a natural ordering in opposed to linear array.

c. A record form a hierarchical structure but a lienear array does not


d. All of above
12. Which of the following statement is false?
a. Arrays are dense lists and static data structure
b. data elements in linked list need not be stored in adjecent space in memory
c. pointers store the next data element of a list
d. linked lists are collection of the nodes that contain information part and next
pointer
13. Binary search algorithm can not be applied to
a. sorted linked list
b. sorted binary trees
c. sorted linear array
d. pointer array
14. When new data are to be inserted into a data structure, but there is no available
space; this situation is usually called
a. underflow
b. overflow
c. housefull
d. saturated
15. The situation when in a linked list START=NULL is
a. underflow
b. overflow
c. housefull
d. saturated
16. Which of the following is two way list?
a. grounded header list
b. circular header list
c. linked list with header and trailer nodes
d. none of above
17. Which of the following name does not relate to stacks?
a. FIFO lists
b. LIFO list
c. Piles
d. Push-down lists
18. The term "push" and "pop" is related to the
a. array
b. lists
c. stacks
d. all of above
19. A data structure where elements can be added or removed at either end but not in

the middle
a. Linked lists
b. Stacks
c. Queues
d. Deque
20. When inorder traversing a tree resulted E A C K F H D B G; the preorder traversal
would return
a. FAEKCDBHG
b. FAEKCDHGB
c. EAFKHDCBG
d. FEAKDCHBG

Answers
1. The memory address of the first element of an array is called
d. base address
2. The memory address of fifth element of an array can be calculated by the
formula
a. LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number
of words per memory cell for the array
3. Which of the following data structures are indexed structures?
a. linear arrays
4. Which of the following is not the required condition for binary search
algorithm?
c. There must be mechanism to delete and/or insert elements in list
5. Which of the following is not a limitation of binary search algorithm?
d. binary search algorithm is not efficient when the data elements are more
than 1000.
6. Two dimensional arrays are also called
c. both of above
7. A variable P is called pointer if
a. P contains the address of an element in DATA.
8. Which of the following data structure can't store the non-homogeneous data
elements?

a. Arrays
9. Which of the following data structure store the non-homogeneous data
elements?
b. Records
10. Each data item in a record may be a group item composed of sub-items; those
items which are indecomposable are called
d. all of above
11. The difference between linear array and a record is
d. All of above
12. Which of the following statement is false?
c. pointers store the next data element of a list
13. Binary search algorithm can not be applied to
a. sorted linked list
14. When new data are to be inserted into a data structure, but there is no
available space; this situation is usually called
b. overflow
15. The situation when in a linked list START=NULL is
a. underflow
16. Which of the following is two way list?
d. none of above
17. Which of the following name does not relate to stacks?
a. FIFO lists
18. The term "push" and "pop" is related to the
c. stacks
19. A data structure where elements can be added or removed at either end but
not in the middle
d. Deque
20. When inorder traversing a tree resulted E A C K F H D B G; the preorder
traversal would return
b. FAEKCDHGB

Set - 3
1. Which data structure allows deleting data elements from front and inserting at
rear?
a. Stacks
b. Queues
c. Deques
d. Binary search tree
2. Identify the data structure which allows deletions at both ends of the list but
insertion at only one end.
a. Input-restricted deque
b. Output-restricted deque
c. Priority queues
d. None of above
3. Which of the following data structure is non-linear type?
a. Strings
b. Lists
c. Stacks
d. None of above
4. Which of the following data structure is linear type?
a. Strings
b. Lists
c. Queues
d. All of above
5. To represent hierarchical relationship between elements, which data structure is
suitable?
a. Deque
b. Priority
c. Tree
d. All of above
6. A binary tree whose every node has either zero or two children is called
a. Complete binary tree
b. Binary search tree
c. Extended binary tree
d. None of above
7. The depth of a complete binary tree is given by
a. Dn = n log2n
b. Dn = n log2n+1
c. Dn = log2n

d. Dn = log2n+1
8. When representing any algebraic expression E which uses only binary operations
in a 2-tree,
a. the variable in E will appear as external nodes and operations in internal nodes
b. the operations in E will appear as external nodes and variables in internal
nodes
c. the variables and operations in E will appear only in internal nodes
d. the variables and operations in E will appear only in external nodes
9. A binary tree can easily be converted into q 2-tree
a. by replacing each empty sub tree by a new internal node
b. by inserting an internal nodes for non-empty node
c. by inserting an external nodes for non-empty node
d. by replacing each empty sub tree by a new external node
10. When converting binary tree into extended binary tree, all the original nodes in
binary tree are
a. internal nodes on extended tree
b. external nodes on extended tree
c. vanished on extended tree
d. None of above
11. The post order traversal of a binary tree is DEBFCA. Find out the pre order
traversal
a. ABFCDE
b. ADBFEC
c. ABDECF
d. ABDCEF
12. Which of the following sorting algorithm is of divide-and-conquer type?
a. Bubble sort
b. Insertion sort
c. Quick sort
d. All of above
13. An algorithm that calls itself directly or indirectly is known as
a. Sub algorithm
b. Recursion
c. Polish notation
d. Traversal algorithm
14. In a binary tree, certain null entries are replaced by special pointers which point to
nodes higher in the tree for efficiency. These special pointers are called
a. Leaf
b. branch
c. path
d. thread

15. The in order traversal of tree will yield a sorted listing of elements of tree in
a. Binary trees
b. Binary search trees
c. Heaps
d. None of above
16. In a Heap tree
a. Values in a node is greater than every value in left sub tree and smaller than
right sub tree
b. Values in a node is greater than every value in children of it
c. Both of above conditions applies
d. None of above conditions applies
17. In a graph if e=[u, v], Then u and v are called
a. endpoints of e
b. adjacent nodes
c. neighbors
d. all of above
18. A connected graph T without any cycles is called
a. a tree graph
b. free tree
c. a tree
d. All of above
19. In a graph if e=(u, v) means
a. u is adjacent to v but v is not adjacent to u
b. e begins at u and ends at v
c. u is processor and v is successor
d. both b and c
20. If every node u in G is adjacent to every other node v in G, A graph is said to be
a. isolated
b. complete
c. finite
d. strongly connected

Answers:

1. Which data structure allows deleting data elements from front and inserting at rear?
b. Queues

2. Identify the data structure which allows deletions at both ends of the list but
insertion at only one end.
a. Input-restricted deque
3. Which of the following data structure is non-linear type?
d. None of above
4. Which of the following data structure is linear type?
d. All of above
5. To represent hierarchical relationship between elements, which data structure is
suitable?
c. Tree
6. A binary tree whose every node has either zero or two children is called
c. Extended binary tree
7. The depth of a complete binary tree is given by
d. Dn = log2n + 1
8. When representing any algebraic expression E which uses only binary operations
in a 2-tree,
a. the variable in E will appear as external nodes and operations in internal nodes
9. A binary tree can easily be converted into q 2-tree
d. by replacing each empty sub tree by a new external node
10. When converting binary tree into extended binary tree, all the original nodes in
binary tree are
a. internal nodes on extended tree
11. The post order traversal of a binary tree is DEBFCA. Find out the pre order
traversal
c. ABDECF
12. Which of the following sorting algorithm is of divide-and-conquer type?
c. Quick sort
13. An algorithm that calls itself directly or indirectly is known as
b. Recursion
14. In a binary tree, certain null entries are replaced by special pointers which point to
nodes higher in the tree for efficiency. These special pointers are called
d. thread

15. The in order traversal of tree will yield a sorted listing of elements of tree in
b. Binary search trees
16. In a Heap tree
b. Values in a node is greater than every value in children of it
17. In a graph if e=[u, v], Then u and v are called
d. all of above
18. A connected graph T without any cycles is called
d. All of above
19. In a graph if e=(u, v) means
d. both b and c
20. If every node u in G is adjacent to every other node v in G, A graph is said to be
b. complete
Network
Question 1:
In OSI network architecture, the dialogue control and token management are responsibility of
a. session layer
b. network layer
c. transport layer
d. data link layer
e. none of above
Collection on http://www.cs-mcqs.blogspot.com
Question 2:
In OSI network architecture, the routing is performed by
a. network layer
b. data link layer
c. transport layer
d. session layer
e. none of above
Collection on http://www.cs-mcqs.blogspot.com
Question 3:
Which of the following performs modulation and demodulation?
a. fiber optics
b. satellite
c. coaxial cable
d. modem
e. none of the above
Collection on http://www.cs-mcqs.blogspot.com

Question 4:
The process of converting analog signals into digital signals so they can be processed by a receiving
computer is referred to as:
a. modulation
b. demodulation
c. synchronizing
d. digitising
Collection on http://www.cs-mcqs.blogspot.com
Question 5:
How many OSI layers are covered in the X.25 standard?
a. Two
b. Three
c. Seven
d. Six
e. None of above
Collection on http://www.cs-mcqs.blogspot.com
Question 6:
Layer one of the OSI model is
a. physical layer
b. link layer
c. transport layer
d. network layer
e. none of above
Collection on http://www.cs-mcqs.blogspot.com
Question 7:
The x.25 standard specifies a
a. technique for start-stop data
b. technique for dial access
c. DTE/DCE interface
d. data bit rate
e. none of above
Collection on http://www.cs-mcqs.blogspot.com
Question 8:
Which of the following communication modes support two-way traffic but in only one direction at a
time?
a. simplex
b. half duplex
c. three-quarters duplex
d. all of the above
e. none of the above
Question 9:
Which of the following might be used by a company to satisfy its growing communications needs?
a. front end processor

b. multiplexer
c. controller
d. concentrator
e. all of the above
Collection on http://www.cs-mcqs.blogspot.com
Question 10:
What is the number of separate protocol layers at the serial interface gateway specified by the X.25
standard?
a. 4
b. 2
c. 6
d. 3
3. none of the above
Collection on http://www.cs-mcqs.blogspot.com
Correct Answers:
1. a
2. a
3. d
4. d
5. b
6. a
7. c
8. b
9. e
10. d

SET-2
Question 1:
The interactive transmission of data within a time sharing system may be best suited to
a. simplex lines
b. half-duplex lines
c. full duplex lines
d. biflex-lines
Question 2:
Which of the following statement is incorrect?
a. The difference between synchronous and asynchronous transmission is the clocking derived from
the data in synchronous transmission.
b. Half duplex line is a communication line in which data can move in two directions, but not at the
same time.
c. Teleprocessing combines telecommunications and DP techniques in online activities
d. Batch processing is the prefered processing mode for telecommunication operation.

Question 3:
Which of hte following is considered a broad band communication channel?
a. coaxial cable
b. fiber optics cable
c. microwave circuits
d. all of above
Question 4:
Which of the following is not a transmission medium?
a. telephone lines
b. coaxial cables
c. modem
d. microwave systems
Question 5:
Which of the following does not allow multiple uses or devices to share one communication line?
a. doubleplexer
b. multiplexer
c. concentrator
d. controller
Question 6:
Which of the following signal is not standard RS-232-C signal?
a. VDR
b. RTS
c. CTS
d. DSR
Question 7:
Which of the following statement is incorrect?
a. Multiplexers are designed to accept data from several I/O devices and transmit a unified stream
of data on one communication line
b. HDLC is a standard synchronous communication protocol.
c. RTS/CTS is the way the DTE indicates that it is ready to transmit data and the way the DCW
indicates that it is ready to accept data
d. RTS/CTS is the way the terminal indicates ringing
Question 8:
Which of the following is an advantage to using fiber optics data transmission?
a. resistance to data theft
b. fast data transmission rate
c. low noise level
d. all of above
Question 9:
Which of the following is required to communicate between two computers?
a. communications software
b. protocol
c. communication hardware
d. all of above including access to transmission medium
Question 10:

The transmission signal coding method of TI carrier is called


a. Bipolar
b. NRZ
c. Manchester
d. Binary
Answers:

1. b
2. d
3. d
4. c
5. a
6. a
7. d
8. d
9. d
10. a

SET-3
Question 1:
Which data communication method is used to transmit the data over a serial communication link?
a. simplex
b. half-duplex
c. full-duplex
d. b and c
e. None of above
Question 2:
What is the minimum number of wires needed to send data over a serial communication link layer?
a. 1
b. 2
c. 4
d. 6
e. none of above
Question 3:
Which of the following types of channels moves data relatively slowly?
a. wide band channel
b. voice band challen
c. narrow band channel
Question 4:
Most data communications involving telegraph lines use:
a. simplex lines
b. wideband channel
c. narrowband channel
d. dialed service
Question 5:

A communications device that combines transmissions from several I/O devices into one line is a
a. concentrator
b. modifier
c. multiplexer
d. full-duplex line
Question 6:
How much power (roughly) a light emitting diode can couple into an optical fiber?
a. 100 microwatts
b. 440 microwatts
c. 100 picowatts
d. 10 miliwatts
Question 7:
The synchronous modems are more costly than the asynchronous modems because
a. they produce large volume of data
b. they contain clock recovery circuits
c. they transmit the data with stop and start bits
d. they operate with a larger bandwidth
e. none of above
Question 8:
Which of the following statement is correct?
a. terminal section of a synchronous modem contains the scrambler
b. receiver section of a synchronous modem contains the scrambler
c. transmission section of a synchronous modem contains the scrambler
d. control section of a synchronous modem contains the scrambler
e. none of the above
Question 9:
In a synchronous modem, the digital-to-analog converter transmits signal to the
a. equilizer
b. modulator
c. demodulator
d. terminal
e. none of aobve
Question 10:
Which of the following communications lines is best suited to interactive processing applications?
a. narrow band channel
b. simplex lines
c. full duplex lines
d. mixed band channels

Answers
1. c
2. b
3. c

4. c
5. c
6. a
7. b
8. c
9. a
10. c

SET-4
Question:1
A remote batch-processing operation in which data is solely input to a central computer would
require
a. telegraphp line
b. simplex lines
c. mixed bad channel
d. all of above
Question 2:
A band is always equivalent to
a. a byte
b. a bit
c. 100 bits
d. none of above
Question 3:
The loss in signal power as light travels down the fiber is called
a. attenuation
b. progragation
c. scattering
d. interruption
Question 4:
Avalanche photodiode receivers can detect bits of transmitted data by receiving
a. 100 photons
b. 200 photons
c. 2000 photons
d. 300 photons
Question 5:
Communiction circuits that transmit data in both directions but not at the same time are operating in
a. a simplex mode
b. a half duplex mode
c. a full duplex mode
d. an asynchronous mode
Question 6:
An example of a medium speed, switched communications service is
a. series 1000
b. data phone 50
c. DDD

d. All of the above


Question 7:
In communication satellite, multiple repeaters are known as
a. detector
b. modulator
c. stations
d. transponders
Question 8:
While transmitting odd-parity coded symbols, the number of zeros in each symbol is
a. odd
b. even
c. a and b both
d. unknown
Question 9:
Data communications monitors available on the software marked include
a. ENVIRON/1
b. TOTAL
c. BPL
d. Telnet
Question 10:
An example of an analog communication method is
a. laser beam
b. microwave
c. voice grade telephone line
d. all of the above

Answers
1. b
2. d
3. a
4. b
5. b
6. c
7. d
8. d
9. a
10. d

SET-5
Question:1
Number of bits per symbol used in Baudot code is
a. 7
b. 5

c. 8
d. 9
Question 2:
What is the main difference between DDCMP and SDLC?
a. DDCMP does not need special hardware to final the beginning of a message
b. DDCMP has a message header
c. SDLC has a IP address
d. SDLC does not use CRC
Question 3:
An example of digital, rather than analog, communication is
a. DDD
b. DDS
c. WATS
d. DDT
Question 4:
Terminals are required for
a. real-time, batch processing & time-sharing
b. real time, time-sharing & distributed message processing
c. real time, distributed processing & manager inquiry
d. real-time, time sharing & message switching
Question 5:
The receive equilizer reduces delay distortions using a
a. tapped delay lines
b. gearshift
c. descrambler
d. difference engine
Question 6:
Ina synchronous modem, the receive equilizer is known as
a. adaptive equilizer
b. impariment equilizer
c. statistical equilizer
d. compromise equilizer
Question 7:
The channel in the data communication model can be
a. postal mail services

b. telephone lines
c. radio lines
d. any of the above
Question 8:
A data terminal serves as an
a. Effector
b. sensor
c. both a and b
d. neither a nor b
Question 9:
Which of the following transmission systems provide the highest data rate to in individual device?
a. computer bus
b. telephone lines
c. voice and mode
d. lease lines
Question 10:
A protocol is a set of rules governing a time sequence of events that must take place
a. between peers
b. between an interface
c. between modems
d. across an interface

Answers
1. b
2. a
3. b
4. d
5. a
6. a
7. d
8. c
9. a
10. a
-Toc

iven the language L-{ab, aa, baa}, which of the following strings are in L*?
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
1,2 and 3
2,3 and 4
1,2 and 4
1,3 and 4
______________________________________________________________________________
_______
Push down machine represents
Type 0 Grammar
Type 1 grammar
Type-2 grammar
Type-3 grammar
______________________________________________________________________________
_______
The behavior of a NFA can be stimulated by DFA
always
sometimes
never
depend on NFA
______________________________________________________________________________
_______

Both statements S1 and S2 are incorrect.


S1 is incorrect and S2 is correct.
S1 is correct and S2 is incorrect.
Both statements S1 and S2 are correct.
______________________________________________________________________________
_______

A
B
C
D
______________________________________________________________________________
_______
Which of the following is not primitive recursive but partially recursive?
Carnot function
Rieman function
Bounded function
Ackermann function
______________________________________________________________________________
_______
Consider the following grammar.
S ::= AB
A ::= a
A ::= BaB
B ::= bbA
Which of the following is false?
No string produced by the grammar has four consecutive b s
No string produced by the grammar has three consecutive a s
No string produced by the grammar has an odd number of consecutive b s
The length of every string produced by the grammar is even.
______________________________________________________________________________
_______
Set of regular languages over a given alphabet set,is not closed under
Union
Complementation
Intersection
None of the above
______________________________________________________________________________
_______

Consider the regular expression (a + b) (a + b) (a + b) (n-times). The minimum number of


states in finite automaton that recognizes the language represented by this regular expression
contains
n states
n + 1 states
n + 2 states
2n states
______________________________________________________________________________
_______
LL grammar for the language L = {an bm cn+m | m=0, n=0} is

A
B
C
D
______________________________________________________________________________
_______
The logic of pumping lemma is a good example of
The pigeon hole principle
Divide and conquer method
Iteration
Recursion
______________________________________________________________________________
_______
If every string of a language can be determined whether it is legal or illegal in finite time the
language is called
Decidable
Undecidable
Interpretive
Non deterministic
______________________________________________________________________________
_______

Context free language can be recognized by


Finite State Automaton
Linear bounded automaton
Pushdown automaton
Both B and C
______________________________________________________________________________
_______
Fred created a new automaton model which is a push down automaton but with two stacks
and the added ability of having commands which do not read input tape but which can pop
from one stack and push into the other.This new automaton can recognize (choose strongest
result)
Context free language
Context sensitive language
Regular language
Languages recognizable by Turing machine
______________________________________________________________________________
_______
Given the following productions of a grammar :

The language corresponding to the given grammar is a set of even number of a s.


The language corresponding to the given grammar is a set of odd number of a s.
The language corresponding to the given grammar is a set of even number of as followed by odd
number of b s.
The language corresponding to the given grammar is a set of odd number of as followed by even
number of b s.
______________________________________________________________________________
_______
Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two
zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of
length less than 3 are also in the language. A partially completed DFA that accepts this
language is shown below.

A
B
C
D
______________________________________________________________________________
_______

A
B
C
D
______________________________________________________________________________
_______
The regular expression for the following DFA

ab*(b + aa*b)*
a*b(b + aa*b)*
a*b(b* + aa*b)
a*b(b * + aa*b)*
______________________________________________________________________________
_______
FSM can recognize
Any grammar
Only CFG
Any unambiguous grammar
Only regular grammar
______________________________________________________________________________
_______

Assume statements S1 and S2 defined as :


S1 : L2-L1 is recursive enumerable where L1 and L2 are recursive and recursive enumerable
respectively.
S2 : The set of all Turing machines is countable.
Which of the following is true ?
S1 is correct and S2 is not correct.
Both S1 and S2 are correct.
Both S1 and S2 are not correct.
S1 is not correct and S2 is correct.
______________________________________________________________________________
_______
Which of the following is the most general phase structured grammar ?
Regular
Context-sensitive
Context free
None of the above
______________________________________________________________________________
_______
A FSM can be used to add how many given integers?
1
3
4
5
______________________________________________________________________________
_______
The language accepted by the nondeterministic pushdown automaton

L(abb*a)
{a} U L(abb*a)
L(ab*a)
{a} U L(ab*a)
______________________________________________________________________________
_______

Consider the following statements :


I. Recursive languages are closed under complementation.
II. Recursively enumerable languages are closed under union.
III. Recursively enumerable languages are closed under complementation.
Which of the above statements are true ?
I only
I and II
I and III
I and III
______________________________________________________________________________
_______
6 Files F1,F2,F3,F4,F5 and F6 have 100,200,50,80,120,150 records repectively.
In what order should they be sorted so as to optimize activity? Assume each file is accessed
with the same frequency.
F3,F4,F1,F5,F6,F2
F2,F6,F5,F1,F4,F3
F1,F2,F3,F4,F5,F6
Ordering is immaterial as all files are accessed with the same frequency
______________________________________________________________________________
_______
Following grammar
S-> bS
S -> b
S -> aA
A -> bA
Type -3 grammar
Type -2 grammar
Type -1 grammar
Type -0 grammar
______________________________________________________________________________
_______

Which of the following problems are decidable?


1) Does a given program ever produce an output?
2) If L is context-free language, then, is ~L also context-free?
3) If L is regular language, then, is ~L also regular?
4) If L is recursive language, then, is ~L also recursive?
1,2,3,4
1,2
2,3,4
3,4
______________________________________________________________________________
_______
The language L={ak bk|k>=1} is
Type -3 Grammar
Type -2 Grammar
Type -1 Grammar
Type -0 Grammar
______________________________________________________________________________
_______
All strings having equal number of a and b can be recognized by
DFA
NDFA
PDA
All of these
______________________________________________________________________________
_______
The basic limitation of a FSM is that
It cannot remember arbitrary large amount of information
It sometimes recognizes grammar that are not regular
It sometimes fails to recognize grammars that are regular
All of the above
______________________________________________________________________________
_______
How many states can a process be in ?
2
3
4
5
______________________________________________________________________________
_______

Which one of the following statement is false ?


Context-free languages are closed under union
Context-free languages are closed under concatenation
Context-free languages are closed under intersection
Context-free languages are closed under Kleene closure
______________________________________________________________________________
_______
Given the language L = {ab, aa, baa}, which of the following strings are in L*?
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
1, 2 and 3
2, 3 and 4
1, 2 and 4
1, 3 and 4
______________________________________________________________________________
_______
Which is not the correct statement(s) ?
(i) Every context sensitive language is recursive.
(ii) There is a recursive language that is not context sensitive.
(i) is true, (ii) is false.
(i) is true and (ii) is true.
(i) is false, (ii) is false.
(i) is false and (ii) is true.
______________________________________________________________________________
_______
A formal grammar is a___________for rewriting strings.
Set of rules
Set of functions
Both A and B
None of the above
______________________________________________________________________________
_______
Finite automata are used for pattern matching in text editors for
Compiler lexical analysis
Programming in localized application
Both A and B
None of the above
______________________________________________________________________________
_______

Two finite states are equivalent if they


Have same number of states
Have same number of edges
Have same number of states and edges
Recognize same set of tokens
______________________________________________________________________________
_______
A PDM behaves like a TM when the number of auxiliary memory it has is
Zero
One or more
Two or more
None of these
______________________________________________________________________________
_______
Which of the following permanent database that has an entry for each terminal symbol ?
Literal table
Identifier table
Terminal table
Source table
______________________________________________________________________________
_______
The language accepted by finite automata is
Context free
Regular
Non regular
None of these
______________________________________________________________________________
_______
The following CFG
SaB|bA, Aa|as|bAA, Bb|bs|aBB
generates strings of terminals that have
Odd number of as and odd number of bs
Even number of as and even number of bs
Equal number of as and bs
Not equal number of as and bs
______________________________________________________________________________
_______

An FSM can be used to add two given integers.This remark is


True
False
May be true
None of the above
______________________________________________________________________________
_______
Context free languages are not closed under
Union
Concatenation
Closure
Iteration
______________________________________________________________________________
_______
Given a Non-deterministic Finite Automation (NFA) with states p and r as initial and final
states respectively and transition table as given below :

The minimum number of states required in Deterministic Finite Automation (DFA)


equivalent to NFA is
5
4
3
2
______________________________________________________________________________
_______
Which of the following is most powerful?
DFA
NDFA
2PDA
DPDA
______________________________________________________________________________
_______

Which of the following statements is/are FALSE?


(1) For every non-deterministic Turing machine, there exists an equivalent deterministic
Turing machine.
(2) Turing recognizable languages are closed under union and complementation.
(3) Turing decidable languages are closed under intersection and complementation
(4) Turing recognizable languages are closed under union and intersection.
1 and 4 only
1 and 3 only
2 only
3 only
______________________________________________________________________________
_______

G1 is ambiguous and G2 is not ambiguous.


G1 is ambiguous and G2 is ambiguous.
G1 is not ambiguous and G2 is ambiguous.
G1 is not ambiguous and G2 is not ambiguous.
______________________________________________________________________________
_______
Finite state machine___________recognize palindromes.
Can
Cannot
May
May not
______________________________________________________________________________
_______
Given L1=L(a*baa*) and L2=L(ab*). The regular expression corresponding to language L3 =
L1/L2 (right quotient) is given by
a*b
a*baa*
a*ba*
None of the above
______________________________________________________________________________
_______

If two finite state machines are equivalent they should have the same number of
States
Edges
States and edges
None of these
______________________________________________________________________________
_______
Oops
hat will be the output of following program?
#include<iostream.h>
void main()
{
float x;
x=(float)9/2;
cout<<x;
}
4.5
4.0
4
5
______________________________________________________________________________
_______
The term __________ means the ability to take many forms.
Inheritance
Polymorphism
Member function
Encapsulation
______________________________________________________________________________
_______
Runtime polymorphism is achieved by
Friend function
Virtual function
Operator overloading
Function overloading
______________________________________________________________________________
_______

Access to private data


Restricted to methods of the same class
Restricted to methods of other classes
Available to methods of the same class and other classes
Not an issue because the program will not compile
______________________________________________________________________________
_______
Additional information sent when an exception is thrown may be placed in
The throw keyword
The function that caused the error
The catch block
An object of the exception class
______________________________________________________________________________
_______
A static data member is given a value
Within the class definition
Outside the class definition
When the program is exeuted
Never
______________________________________________________________________________
_______
What will be the result of the expression 13 & 25?
38
25
9
12
______________________________________________________________________________
_______
In a class specifier ,data or function designated private are accessible
To any function in the program
Only if you the password
To member functions of that class
Only to public members of the class
______________________________________________________________________________
_______

Which of the statements are true ?


I. Function overloading is done at compile time.
II. Protected members are accessible to the member of derived class.
III. A derived class inherits constructors and destructors.
IV. A friend function can be called like a normal function.
V. Nested class is a derived class.
I, II, III
II, III, V
III, IV, V
I, II, IV
______________________________________________________________________________
_______
At which point of time a variable comes into existence in memory is determined by its
Scope
Storage class
Data type
All of the above
______________________________________________________________________________
_______
When the compiler cannot differentiate between two overloaded constructors, they are called
Overloaded
Destructed
Ambiguous
Dubious
______________________________________________________________________________
_______
The actual source code for implementing a template function is created when
The declaration of function appears.
The function is invoked.
The definition of the function appears.
None of the above.
______________________________________________________________________________
_______
Usually a pure virtual function
Has complete function body
Will never be called
Will be called only to delete an object
Is defined only in derived class
______________________________________________________________________________
_______

Which of the following is the valid class declaration header for the derived class d with base
classes b1 and b2?
class d : public b1, public b2
class d : class b1, class b2
class d : public b1, b2
class d : b1, b2
______________________________________________________________________________
_______
The process of extracting the relevant attributes of an object is known as
Polymorphism
Inheritence
Abstraction
Data hiding
______________________________________________________________________________
_______
What features make C++ so powerful ?
Easy implementation
Reusing old code
Reusing old code
All of the above
______________________________________________________________________________
_______
Which of the following operator can be overloaded through friend function?
->
=
()
*
______________________________________________________________________________
_______
The keyword friend does not appear in
The class allowing access to another class
The class desiring access to another class
The private section of a class
The public section of a class
______________________________________________________________________________
_______

Exception handling is targeted at


Run-time error
Compile time error
Logical error
All of the above
______________________________________________________________________________
_______
Function templates can accept
Any type of parameters
Only one parameter
Only parameters of the basic type
Only parameters of the derived type
______________________________________________________________________________
_______
If the variable count exceeds 100, a single statement that prints Too many is
if (count<100) cout << Too many;
if (count>100) cout >> Too many;
if (count>100) cout << Too many;
None of these.
______________________________________________________________________________
_______
The mechanism that binds code and data together and keeps them secure from outside world
is known as
Abstraction
Inheritance
Encapsulation
Polymorphism
______________________________________________________________________________
_______
The operator << when overloaded in a class
must be a member function
must be a non member function
can be both (A) & (B) above
cannot be overloaded
______________________________________________________________________________
_______

To access the public function fbase() in the base class, a statement in a derived class function
fder() uses the statement.fbase();
fbase();
fder();
base::fbase();
der::fder();
______________________________________________________________________________
_______
In which case is it mandatory to provide a destructor in a class?
Almost in every class
Class for which two or more than two objects will be created
Class for which copy constructor is defined
Class whose objects will be created dynamically
______________________________________________________________________________
_______
_________ members of a base class are never accessible to a derived class.
Public
Private
Protected
A,B and C
______________________________________________________________________________
_______
What is the error in the following code?
class t
{
virtual void print();
}
No error
Function print() should be declared as static.
Function print() should be defined.
Class t should contain data members.
______________________________________________________________________________
_______
It is possible to declare as a friend
A member function
A global function
A class
All of the above
______________________________________________________________________________
_______

A struct is the same as a class except that


There are no member functions
All members are public
Cannot be used in inheritance hierarchy
It does have a this pointer
______________________________________________________________________________
_______
C++ was originally developed by
Clocksin and Melish
Donald E.Knuth
Sir Richard Hadlee
Bjarne Stroustrup
______________________________________________________________________________
_______
What is the output of the following code
char symbol[3]={a,b,c};
for (int index=0; index<3; index++)
cout << symbol [index];
abc
abc
abc
abc
______________________________________________________________________________
_______
If we create a file by ifstream, then the default mode of the file is _________
ios :: out
ios :: in
ios :: app
ios :: binary
______________________________________________________________________________
_______
The following can be declared as friend in a class
An object
A class
A public data member
A private data member
______________________________________________________________________________
_______

The polymorphism can be characterized by the phrase


One interface,multiple methods
Multiple interfaces,one method
One interface,one method
None of the above
______________________________________________________________________________
_______
A virtual class is the same as
An abstract class
A class with a virtual function
A base class
None of the above
______________________________________________________________________________
_______
Member functions, when defined within the class specification
Are always inline
Are not inline
Are inline by default, unless they are too big or too complicated
Are not inline by default.
______________________________________________________________________________
_______
Assume that we have constructor functions for both base class and derived class. Now
consider the declaration in main( ). Base * P = New Derived; in what sequence will the
constructor be called ?
Derived class constructor followed by Base class constructor.
Base class constructor followed by derived class constructor.
Base class constructor will not be called.
Base class constructor will not be called.
______________________________________________________________________________
_______
The operator that cannot be overloaded is
++
::
~
()
______________________________________________________________________________
_______

Which of the following declarations are illegal?


void *ptr;
char *str = hello;
char str = hello;
const *int p1;
______________________________________________________________________________
_______
Identify the operator that is NOT used with pointers
->
&
*
>>
______________________________________________________________________________
_______
Which of the following statements is NOT valid about operator overloading?
Only existing operators can be overloaded
Overloaded operator must have at least one operand of its class type
The overloaded operators follow the syntax rules of the original operator
None of the above
______________________________________________________________________________
_______
Overloading a postfix increment operator by means of a member function takes
No argument
One argument
Two arguments
Three arguments
______________________________________________________________________________
_______
Which of the following will produce a value 10 if x = 9.7?
floor(x)
abs(x)
log(x)
ceil(x)
______________________________________________________________________________
_______

Which of the following is not the characteristic of constructor?


They should be declared in the public section.
They do not have return type.
They can not be inherited.
They can be virtual.
______________________________________________________________________________
_______
You may override the class access specifiers
Public members
Public and protected members
Any specific class members you choose
No class members
______________________________________________________________________________
_______
You separated a derived class name from its access specifier with
A colon
Two colons
Atleast one space
A semi colon
______________________________________________________________________________
_______
Consider the following statements:
int x = 22,y=15;
x = (x>y) ? (x+y) : (x-y);
What will be the value of x after executing these statements?
22
37
7
5
______________________________________________________________________________
_______
A friend function to a class, C cannot access
Private data members and member functions
Public data members and member functions
Protected data members and member functions
The data members of the derived class of C
______________________________________________________________________________
_______

The members of a class by default are


Public
Protected
Private
Mandatory to specify
______________________________________________________________________________
_______
If x =5, y =2 then x ^y equals________.
(where ^ is a bitwise XOR operator)
00000111
10000010
10100000
11001000
______________________________________________________________________________
_______
at
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Object 1

You might also like