APPSC-2012-DL-CS
Question 1 |
The storage place that holds data and instruction temporarily within CPU is
Accumulator | |
Bus | |
Register | |
Addresses |
Question 1 Explanation:
Register holds both data and instruction temporarily within the CPU .
Note that Accumulator holds only data and not the instruction.
Note that Accumulator holds only data and not the instruction.
Question 2 |
Which of the following supports the concept of multiple inheritance?
C++ | |
Java | |
Both C++ and Java | |
None |
Question 2 Explanation:
C++ supports multiple inheritance whereas java does not.
Question 3 |
Which of the following statements is false?
A tree contains a cycle
| |
Every tree is a graph
| |
A tree with N nodes contain N-1 edges | |
All the above
|
Question 3 Explanation:
A tree does not contain a cycle. A tree with n vertices contains n-1 edges. And every tree is a graph.
Question 4 |
Match the following typical example problems with suitable algorithm-design paradigms
A: Minimal Spanning Tree
B: Binary Search Algorithm
C: Depth-First Search
D: Optimization
I: Divide and Conquer
II: Greedy Method
III: NLP
IV: Backtracking
A-II, B-I, C-IV, D-III
| |
A-III, B-II, C-IV, D-I
| |
A-III, B-I, C-IV, D-II
| |
A-IV, B-I, C-II, D-III |
Question 4 Explanation:
A. Minimal spanning tree is a greedy algorithm.
B. Binary Search algorithm is a divide and conquer strategy.
C. Depth first search algorithm is a backtracking method.
D. Optimization is a NLP method.
B. Binary Search algorithm is a divide and conquer strategy.
C. Depth first search algorithm is a backtracking method.
D. Optimization is a NLP method.
Question 5 |
What is the output of the following Pascal program segment?
{c: array [1..10] of integer;
m, n, temp : integer;
procedure r (k, j : integer)
begin
k :=k+1; j :=j+2;
end r;
…
m :5; n := 3;
r(m, n)
temp;=m; m:=n; n:temp;
write m, n;
}
3, 5
| |
5, 3 | |
Either 3, 5 or 5, 3 | |
Unpredictable | |
Answer the above question with explanation |
Question 6 |
Which of the following statements is false?
An unambiguous grammar has the same leftmost and rightmost derivation | |
An LL(1) parser is a top-down parser | |
LALR is more powerful than SLR | |
An unambiguous grammar can never be LR(k) for any k |
Question 6 Explanation:
1 is false because unambiguous grammar need not have the same leftmost and rightmost derivation.
4 is false because the correct statement is an ambiguous grammar can never be LR(K) for any k.
4 is false because the correct statement is an ambiguous grammar can never be LR(K) for any k.
Question 7 |
With respect to paging, which of the following is false
It is based on a linear logical memory addressing concept. | |
Entire program need not be loaded into memory before execution | |
It suffers from both internal and external fragmentations | |
Page table is not required once a program is loaded |
Question 7 Explanation:
paging does not suffers from external fragmentation because space allocated to a process need not be contiguous. But paging suffers from internal fragmentation because on an average half of the last page of process gets wasted.
Question 8 |
Relation R with an associated set of functional dependencies F is decomposed into BCNF. The redundancy (arising out of functional dependencies) in the resulting set of relations is
Zero | |
More than Zero but less than that of an equivalent 3NF | |
Proportional to the size of F+ | |
Indeterminate |
Question 8 Explanation:
Redundancy in the resulting set of relations decomposed BCNF is zero.
Question 9 |
A wire frame model is
visual presentation of an electronic representation of a 3D physical object | |
exploits hidden line removal via cutting planes | |
allows visualization of the underlying design structure of a 3D model | |
all the above |
Question 10 |
In which layer of the OSI model, DBMS and email software are found
Presentation Layer | |
Transport layer | |
Application Layer | |
Sessional layer |
Question 10 Explanation:
Both the end user and the application layer interact with the software applications.
Question 11 |
The consistency model supported in IVT (Integrated shared virtual memory at yale) is
Sequential Consistency | |
General Consistency | |
Strict Consistency | |
Weak Consistency | |
Update it |
Question 12 |
____________ is the assurance that the application will perform its intended function with the required precision over an extended period of time
Compatibility | |
Reliability | |
Maintainability | |
portability | |
Update it |
Question 13 |
Which sorting method is best suited for external sorting?
Quick Sort | |
Heap Sort | |
Merge sort | |
All the above |
Question 13 Explanation:
External sorting is a term for a class of sorting algorithms that can handle massive amounts of data. External sorting is required when the data being sorted do not fit into the main memory of a computing device (usually RAM) and instead they must reside in the slower external memory (usually a hard drive). External sorting typically uses a hybrid sort-merge strategy. In the sorting phase, chunks of data small enough to fit in main memory are read, sorted, and written out to a temporary file. In the merge phase, the sorted sub-files are combined into a single larger file.
Question 14 |
Which of the following is a symmetric key algorithm?
Blowfish | |
IDEA | |
AES | |
All the above |
Question 14 Explanation:
Blowfish,IDEA,AES all are private key or symmetric key encryption algorithms.
Question 15 |
Which of the following is a random access (primary) memory?
Disk | |
Tape | |
ROM | |
None |
Question 15 Explanation:
Disk ,Tape ,ROM are all permanent storage memory.
Question 16 |
The main difference between a CISC and a RISC processor is/are that a RISC processor typically has
Has fewer instructions and addressing modes | |
Has more registers | |
Easy to implement using hardwired control logic | |
All of the above |
Question 16 Explanation:
All of the above statements are the characteristics of RISC processor.
Question 17 |
What is the proper way of defining a class named A so that it cannot be subclassed?
class A{ } | |
abstract final class A { } | |
class A {final;} | |
final class A { } |
Question 18 |
BFS uses the following data structure to hold nodes that are waiting to be processed
Queue | |
Stack | |
File | |
All the above |
Question 18 Explanation:
BFS uses Queue data structure.
DFS uses Stack data structure.
Question 19 |
Which of the following is not a right paradigm for solving the 0/1-knapsack problem?
Dynamic Programming | |
Branch and Bound | |
Greedy Approximation | |
Divide and Conquer |
Question 19 Explanation:
0/1-knapsack problem is a dynamic programming paradigm.
Question 20 |
__________ is the enforcement of a clear separation between the abstract properties of a data type and the concrete details of its implementation.
Control Abstraction | |
Data Abstraction | |
Abstract Data Type (ADT) | |
None of the above |
Question 21 |
Type checking is normally done during
Lexical Analysis | |
Syntax-directed Translation | |
Syntax Analysis | |
Code Optimization |
Question 21 Explanation:
Type checking is normally done during syntax-directed translation.
Question 22 |
System call is a
A mechanism used by a program to request service from the OS | |
A mechanism used by a programmer to request service from the administrator. | |
A mechanism used by a programmer to request service from the I/O devices. | |
All the above |
Question 22 Explanation:
System call is a mechanism used by a program to request service from OS.
Question 23 |
Consider a schema R(A, B, C, D) and functional dependencies A → B and C → D. Then the decomposition of R into R1 (A B) and R2(C D) is
Dependency preserving and lossless Join | |
Lossless Joint but not dependency preserving | |
Dependency preserving but not lossless Join | |
Not dependency preserving and not lossless Join |
Question 23 Explanation:
There is no common attribute in the R1 and R2. So the given decomposition is not lossless join.
But they are dependency preserving because A → B is covered by R1 and C → D is covered by R2.
Question 24 |
Which of the following results in fastest access?
Compact Disc (CD) | |
Hard Disk | |
Registers | |
All the above |
Question 24 Explanation:
Registers results in fastest access.
Question 25 |
Interrupt-driven I/O is a type of I/O transfer that
Relies on hardware only | |
Relies on software only | |
Relies on both, software and hardware | |
Relies on neither hardware nor software |
Question 25 Explanation:
Interrupt-driven I/O is a type of I/O transfer that relies completely on both software and hardware.
Question 26 |
The data structure that is used to implement recursion is
Stack | |
Binary Tree | |
Queue | |
All of the above |
Question 26 Explanation:
Stack data structure is used to implement recursion.
Question 27 |
Eight-queens problem can be solved by
Brute Force Method | |
Backtracking | |
Breadth-First Search
| |
All the above |
Question 27 Explanation:
Eight-queens problems can be solved by all the three methods of brute force method, backtracking method,breadth first search method. But the Backtracking method is the best.
Question 28 |
A linker is given object modules for a set of programs that were compiled separately. What information need not be included in an object module?
Object Code | |
Relocation Bits | |
Names and locations of all external symbols defined in the object module | |
Absolute address of internal symbols |
Question 28 Explanation:
Linker does not need absolute address of internal symbol because absolute address is calculated by loader and not linker. Linker needs relocatable addresses to calculate another relocatable addresses.
Question 29 |
Critical Section Problem (CSP) refers
Sharing of sharable resources | |
Sharing of non-sharable resources | |
Sharing of both shareable and non-sharable resources
| |
No sharing of resources |
Question 29 Explanation:
No sharing of resources
Question 30 |
Examples of transaction systems are
Banking | |
Railway Ticket Booking | |
Stock Trading | |
All the above |
Question 30 Explanation:
All of the above are examples of transaction systems.
Question 31 |
10BASE2 uses ___________ cable while 10BASE5 uses __________ cable
Thick Coaxial, Thin Coaxial | |
Thin Coaxial, Thick Coaxial | |
UTP, Coaxial | |
Coaxial, Fibre-optic |
Question 31 Explanation:
10BASE2 uses thin coaxial cable while 10BASE5 uses thick cable.
Question 32 |
In the context of Operating Systems, a privileged instruction can be executed by the
Process on behalf of the Kernel | |
Kernel on behalf of the requesting process | |
Either (1) or (2) | |
Both (1) and (2) |
Question 32 Explanation:
In the context of the operating system ,a privileged instruction can only be executed by the kernel on behalf of the requesting process .
Question 33 |
A directed graph which represent the deadlock is called
Cyclic Graph | |
Wait-for-Graph | |
Deadlock Graph | |
Deadlock Detection Graph |
Question 33 Explanation:
A wait-for graph in computer science is a directed graph used for deadlock detection in operating systems and relational database systems. ... The wait-for-graph scheme is not applicable to a resource allocation system with multiple instances of each resource type
Question 34 |
Which of the following is not a solution to CSP?
Semaphore | |
Monitor | |
Access Matrix | |
Critical Region |
Question 34 Explanation:
1,2 and 4 is a solution to critical section problem.
But access matrix is not the solution to crtical section problem ,instead it is a security model of protection state in computer system. It is represented as a matrix. Access matrix is used to define the rights of each process executing in the domain with respect to each object. The rows of matrix represent domains and columns represent objects. Each cell of matrix represents set of access rights which are given to the processes of domain means each entry(i, j) defines the set of operations that a process executing in domain Di can invoke on object Oj.
But access matrix is not the solution to crtical section problem ,instead it is a security model of protection state in computer system. It is represented as a matrix. Access matrix is used to define the rights of each process executing in the domain with respect to each object. The rows of matrix represent domains and columns represent objects. Each cell of matrix represents set of access rights which are given to the processes of domain means each entry(i, j) defines the set of operations that a process executing in domain Di can invoke on object Oj.
Question 35 |
Logic Programming is the
Use of mathematical logic for computer programming | |
Use of computer programming for mathematical logic | |
Both (1) and (2) | |
Neither (1) nor (2) |
Question 35 Explanation:
Logic programming is a computer programming paradigm in which program statements express facts and rules about problems within a system of formal logic
Question 36 |
A famous quote of Niklaus Wirth states:
Algorithm+Data Structure=?
Source Code
| |
Program | |
Software | |
Programming Language |
Question 36 Explanation:
Algorithms + Data Structures = Programs is a 1976 book written by Niklaus Wirth covering some of the fundamental topics of computer programming, particularly that algorithms and data structures are inherently related. For example, if one has a sorted list one will use a search algorithm optimal for sorted lists.
Question 37 |
Which of the following devices should get higher priority in assigning Interrupts?
Hard disk | |
Floppy Disk | |
Printer | |
Keyboard |
Question 37 Explanation:
The device operating at highest speed should be given the highest priority. So among the given devices hard disk operates at the highest speed and should get the highest priority..
Question 38 |
The most appropriate matching for the following pairs is
X: Indirect Addressing
Y: Immediate Addressing
Z: Auto Decrement Addressing
I: Loope
II. Pointers
III. Constants
X-III, Y-II,Z-I | |
X-I, Y-III, Z-II | |
X-II, Y-III, Z-I | |
X-III, Y-I, Z-II |
Question 38 Explanation:
Indirect addressing is used for pointers.
Immediate addressing is used for constants.
Auto Decrement addressing is used for loops.
Immediate addressing is used for constants.
Auto Decrement addressing is used for loops.
Question 39 |
The infix form of prefix expression *+abc is
a+b*c | |
(a+b)*c | |
a* (b+c)
| |
None of the above |
Question 39 Explanation:

Now by traversing the tree we get the infix expression as, (a+b)*c
Question 40 |
Which of the following is a right paradigm for solving the popular (Chinese) Sudoku problem?
Backtracking | |
Branch and Bound | |
Dynamic Programming | |
None of the above |
Question 40 Explanation:
The standard recursive approach for Sudoku (pick a cell, enumerate all values, and recurse) is a great example of backtracking, which is the paradigm that best describes this algorithm.
Question 41 |
Heap allocation is required for language
That support recursion | |
That support dynamic data structures | |
That use dynamic scope rules | |
None |
Question 41 Explanation:
Heap allocation is required for language that supports dynamic data structure.
Stack allocation is required for language that supports recursion.
Stack allocation is required for language that supports recursion.
Question 42 |
Thrashing is
A mechanism used by OS to boost its performance | |
A phenomenon where CPU utilization is very poor | |
A concept to improve CPU utilization | |
None |
Question 42 Explanation:
If your system has to swap pages with a higher rate that major chunk of CPU time is spent in swapping then this state is known as thrashing. So effectively during thrashing, the CPU spends less time in some actual productive work and more time in swapping.
Question 43 |
B+ –tree are preferred to binary trees in databases because
Disk capacities are greater than memory capacities | |
Disk access is much slower than memory access | |
Disk data transfer rates are much less than memory data transfer rates | |
Disks are more reliable than memory |
Question 43 Explanation:
The major advantage of the B+ tree (and B-trees in general) over binary search trees is that they play well with caches. If you have a binary search tree whose nodes are stored in more or less random order in memory, then each time you follow a pointer, the machine will have to pull in a new block of memory into the processor cache, which is dramatically slower than accessing memory already in cache.
The B+-tree and the B-tree work by having each node store a huge number of keys or values and have a large number of children. They are typically packed together in a way that makes it possible for a single node to fit nicely into cache (or, if stored on disk, to be pulled from the disk in a single read operation). You then have to do more work to find a key within the node or determine which child to read next, but because all memory accesses done on a single node can be done without going back to disk, the access times are very small. This means that even though in principle a BST might be better in terms of number of memory accesses, the B+-tree and the B-tree can perform better in terms of the runtime of those memory accesses.
The B+-tree and the B-tree work by having each node store a huge number of keys or values and have a large number of children. They are typically packed together in a way that makes it possible for a single node to fit nicely into cache (or, if stored on disk, to be pulled from the disk in a single read operation). You then have to do more work to find a key within the node or determine which child to read next, but because all memory accesses done on a single node can be done without going back to disk, the access times are very small. This means that even though in principle a BST might be better in terms of number of memory accesses, the B+-tree and the B-tree can perform better in terms of the runtime of those memory accesses.
Question 44 |
B+ –tree are preferred to binary trees in databases because
Disk capacities are greater than memory capacities | |
Disk access is much slower than memory access | |
Disk data transfer rates are much less than memory data transfer rates | |
Disks are more reliable than memory |
Question 44 Explanation:
The major advantage of the B+ tree (and B-trees in general) over binary search trees is that they play well with caches. If you have a binary search tree whose nodes are stored in more or less random order in memory, then each time you follow a pointer, the machine will have to pull in a new block of memory into the processor cache, which is dramatically slower than accessing memory already in cache.
The B+-tree and the B-tree work by having each node store a huge number of keys or values and have a large number of children. They are typically packed together in a way that makes it possible for a single node to fit nicely into cache (or, if stored on disk, to be pulled from the disk in a single read operation). You then have to do more work to find a key within the node or determine which child to read next, but because all memory accesses done on a single node can be done without going back to disk, the access times are very small. This means that even though in principle a BST might be better in terms of number of memory accesses, the B+-tree and the B-tree can perform better in terms of the runtime of those memory accesses.
The B+-tree and the B-tree work by having each node store a huge number of keys or values and have a large number of children. They are typically packed together in a way that makes it possible for a single node to fit nicely into cache (or, if stored on disk, to be pulled from the disk in a single read operation). You then have to do more work to find a key within the node or determine which child to read next, but because all memory accesses done on a single node can be done without going back to disk, the access times are very small. This means that even though in principle a BST might be better in terms of number of memory accesses, the B+-tree and the B-tree can perform better in terms of the runtime of those memory accesses.
Question 45 |
Early Ethernet implementations, up to and including 10Base-T, all used the ________ encoding data method
Polar Encoding | |
Differential Manchester encoding | |
Manchester encoding | |
NRZ |
Question 45 Explanation:
Early Ethernet implementations, up to and including 10Base-T, all used the Manchestor encoding.
Question 46 |
Which of the following is a model of Software Development Life Cycle?
Waterfall Model | |
Chaos Model | |
Spiral Model | |
All the above |
Question 46 Explanation:
All of the given models are models of software development life cycles.
Question 47 |
Which of the following is an auxiliary storage device?
Tape | |
Disk | |
Pen Drive (Memory Stick) | |
All the above |
Question 47 Explanation:
Auxiliary storage is any storage that is made available to the system through input/output channels. This term refers to any addressable storage that is not within the system memory (RAM). These storage devices hold data and programs for future use and are considered nonvolatile storage that retains information even when power is not available. They trade slower read/write rates for increased storage capacity.
Auxiliary storage may also be referred to as secondary storage.
So all the given options are auxiliary memory.
Auxiliary storage may also be referred to as secondary storage.
So all the given options are auxiliary memory.
Question 48 |
The average seek time can be reduced in a hard disk drive if
The speed of the motor used for arm movement is increased | |
The recording density is increased | |
The number of surfaces of the hard disk is increased | |
The number of cylinders of the hard disk is reduced |
Question 48 Explanation:
Seek time is directly proportional to the no. of cylinders crossed.
Hence 4 is the correct option.
Hence 4 is the correct option.
Question 49 |
The process of assigning load address to the various parts of the program; and adjusting the code and data in the program to reflect the assigned addresses is called
Assembly | |
Parsing | |
Relocation | |
Symbol Resolution |
Question 49 Explanation:
Relocation is the process of assigning load addresses for position-dependent code and data of a program and adjusting the code and data to reflect the assigned addresses.
Question 50 |
A page table is maintained partially in cache memory with a hit ratio of 80%. Give the following, what is the Effective Access Time.
Cache lookup takes 5 nanosec and memory access time is 100 nanosec.
45 nanosec | |
125 nanosec
| |
25 nanosec | |
105 nanosec |
Question 50 Explanation:
= Hit ratio * cache access time + miss ration * (cache access time + memory access time)
= 0.8 * 5ns + 0.2(5+100)
= 4+ 21
= 25NS
= 0.8 * 5ns + 0.2(5+100)
= 4+ 21
= 25NS
Question 51 |
The two phase commit (2PC) protocol is resilient to
Deadlock | |
Site and link failures | |
Dependencies | |
Starving |
Question 51 Explanation:
The protocol achieves its goal even in many cases of temporary system failure (involving either process, network node, communication, etc. failures), and is thus widely used
Question 52 |
The function of network layer of OSI model
Packet Routing
| |
Congestion Control | |
Internetworking | |
All of these |
Question 52 Explanation:
All of the given options are the application of network layer of OSI model.Many more applications of network layer includes switching,fragmentation,etc.
Question 53 |
Name of the data structure maintained by a Distributed File System (DFS) to map the mount points to appropriate storage devices
Page Table | |
Mount Table | |
Mount Tree
| |
Mount List |
Question 53 Explanation:
Mount mechanisms allow the binding together of different file namespaces to form a single hierarchical namespace. The Unix operating system uses this mechanism. A special entry, known as a mount point, is created at some position in the local file namespace that is bound to the root of another file name space. From the users point of view a mount point is indistinguishable from a local directory entry and may be traversed using standard path names once mounted. File access is therefore location transparent for the user but not for the system administrator. The kernel maintains a structure called a mount table which maps mount points to appropriate file systems. Whenever a file access path crosses a mount point, this is intercepted by the kernel, which then obtains the required service from the remote server.
Question 54 |
Monitor in Computer Science stands for
Monitor and keyboard | |
Name coined for early Operating System | |
A solution for Critical Section Problem (CSP) | |
All the above |
Question 54 Explanation:
Monitor is a solution for critical section problems.
A monitor is a synchronization construct that allows threads to have both mutual exclusion and the ability to wait (block) for a certain condition to become false. Monitors also have a mechanism for signaling other threads that their condition has been met
A monitor is a synchronization construct that allows threads to have both mutual exclusion and the ability to wait (block) for a certain condition to become false. Monitors also have a mechanism for signaling other threads that their condition has been met
Question 55 |
Which of the following is a security requirement?
Confidentiality and Integrity | |
Authentication
| |
Non-repudiation
| |
All the above |
Question 55 Explanation:
Confidentiality-No other person can look into the information.Only for whom it is intended can look into it.
Integrity-No one can change the information. Authentication-It guarantees the identity of the sender. Non-repudiation-Nonrepudiation refers to the ability to ensure that a party to a contract or a communication cannot deny the authenticity of their signature on a document or the sending of a message that they originated. To repudiate means to deny.
Hence all are the security requirement.
Integrity-No one can change the information. Authentication-It guarantees the identity of the sender. Non-repudiation-Nonrepudiation refers to the ability to ensure that a party to a contract or a communication cannot deny the authenticity of their signature on a document or the sending of a message that they originated. To repudiate means to deny.
Hence all are the security requirement.
Question 56 |
In Computer Science jargon, kilo means ___________
1000 | |
210 | |
1024 | |
Both (2) and (3) |
Question 56 Explanation:
In computer science jargon , kilo means 2^10 or 1024.
Question 57 |
Which of the following is true with respect to interrupts?
Unless enabled, a CPU will not be able to process interrupts | |
Loop instructions can not be interrupted till they complete | |
A processor checks for interrupts before executing a new instruction | |
Only level-triggered interrupts are possible on microprocessor |
Question 57 Explanation:
True, unless the interrupt is enabled,even if there will be an interrupt ,the CPU will not be able to process interrupts.
False ,because loop may contain more than one instruction.And the rule is that single instruction cannot be interrupted till they complete.
False, because a processor checks for the interrupts before fetching new instructions.
False.even edge triggered interrupts are possible.
False ,because loop may contain more than one instruction.And the rule is that single instruction cannot be interrupted till they complete.
False, because a processor checks for the interrupts before fetching new instructions.
False.even edge triggered interrupts are possible.
Question 58 |
Which of the following is a nonlinear data structure?
Stack | |
Queue | |
Tree | |
All the above |
Question 58 Explanation:
Stack and queue are linear data structure, but tree is a non linear data structure.
Question 59 |
Which of the following is not a paradigm for designing algorithms?
Greedy Method | |
Divide and Conquer | |
Functional Programming | |
Dynamic Programming |
Question 59 Explanation:
Greedy method,Divide and conquer , Dynamic programming are the designing paradigm but functional programming is not any designing paradigms.
Question 60 |
Which of the following is a functional programming language?
List | |
APL | |
Haskell | |
All the above |
Question 60 Explanation:
Functional programming languages are specially designed to handle symbolic computation and list processing applications. Functional programming is based on mathematical functions. Some of the popular functional programming languages include: Lisp, Python, Erlang, Haskell, Clojure,APL,, etc.
Question 61 |
Which of the following is false with respect to Operating Systems?
It is like a government | |
It is a control program | |
It does no resource allocation | |
It coordinates all the activities |
Question 61 Explanation:
Operating System allocates the resources to the processes which requires it.
Question 62 |
SQL is used for
Data processing in batch mode | |
Query for relational databases | |
DTP work | |
None of the above |
Question 62 Explanation:
SQL is used to communicate with a database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database.
Question 63 |
Which of the following is a line drawing algorithm?
DDA Algorithm | |
Bresenham’s algorithm | |
Mid-point, Algorithm | |
All the above |
Question 63 Explanation:
In any 2-Dimensional plane if we connect two points (x0, y0) and (x1, y1), we get a line segment. But in the case of computer graphics we can not directly join any two coordinate points, for that we should calculate intermediate points coordinate and put a pixel for each intermediate point, of the desired color with help of functions like putpixel(x, y, K) in C, where (x,y) is our co-ordinate and K denotes some color.
For using graphics functions, our system output screen is treated as a coordinate system where the coordinate of the top-left corner is (0, 0) and as we move down our y-ordinate increases and as we move right our x-ordinate increases for any point (x, y).
Now, for generating any line segment we need intermediate points and for calculating them we have many algorithms like DDA ,Bresenham's< midpoint algorithm.
Now, for generating any line segment we need intermediate points and for calculating them we have many algorithms like DDA ,Bresenham's< midpoint algorithm.
Question 64 |
The RSA algorithm is names after _________ who invented it
John Richradson, John Smith and Len Adleman | |
Ron Rivest, John Smith and L Hospital | |
Ron Rivest, Adi Shamir and Len Adleman | |
None of the above |
Question 64 Explanation:
The RSA algorithm is named after Ron Rivest, Adi Shamir and Len Adleman, who invented it in 1977. The RSA algorithm can be used for both public key encryption and digital signatures. Its security is based on the difficulty of factoring large integers.
Question 65 |
The printing speed of a printer is measured by
PPM | |
bsp | |
MB | |
dpi |
Question 65 Explanation:
The speed of early printers was measured in units of characters per minute (cpm) for character printers, or lines per minute (lpm) for line printers. Modern printers are measured in pages per minute (ppm).
Question 66 |
Friend functions have access to
Private and protected members | |
Public members only | |
Private members only | |
None |
Question 66 Explanation:
A friend function of a class is defined outside that class' scope but it has the right to access all private and protected members of the class.
Question 67 |
The maximum depth that a tree of N nodes can have is
N/2 | |
N | |
Log N | |
1 |
Question 67 Explanation:
The maximum depth that a tree of N nodes can have is N,when the tree is skewed.
Question 68 |
Which of the following control structures of C is always executed at least once?
for loop | |
while loop | |
do-while loop | |
All the above |
Question 68 Explanation:
do-while loop in C is always executed at least once, because in this control structure first the loop is executed and then condition is checked ,which is not the case in for loop or while loop.
Question 69 |
Which of the following derivations does a top-down parser use while parsing an input string? The input is assumed to be scanned in left to right order.
Leftmost Derivation | |
Leftmost Derivation traced out in reverse | |
Rightmost Derivation | |
Rightmost Derivation traced out in reverse |
Question 69 Explanation:
Top down parser uses leftmost derivation while parsing an input, while bottom-up parser uses reverse of rightmost derivation while parsing an input.
Question 70 |
Which normal form is considered adequate for normal relational database design?
2NF | |
4NF | |
3NF | |
5NF |
Question 70 Explanation:
3NF normal form is considered adequate for normal relational database design. A relational database table is often described as “normalized” if it is in the Third Normal Form because most of the 3NF tables are free of insertion, update, and deletion anomalies
Question 71 |
Which is true with respect to Remote Procedure Call (RPC) mechanism?
Based on subroutine –call model | |
Unblocked version is also possible | |
Alternative to message-passing model | |
All the above |
Question 71 Explanation:
Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a program located in another computer on a network without having to understand the network's details. A procedure call is also sometimes known as a function call or a subroutine call. RPC uses the client-server model.
Question 72 |
The Stored Program concept is proposed by
Pascal | |
Niklaus Wirth | |
Von Neumann | |
None of the above |
Question 72 Explanation:
The idea was introduced in the late 1940s by John von Neumann, who proposed that a program be electronically stored in binary-number format in a memory device so that instructions could be modified by the computer as determined by intermediate computational result
Question 73 |
When will DMA most probably be used?
The performance of a system is to be increased | |
Several CPU’s in a multiprocessing system share the same memory | |
The CPU must control a variety of the devices | |
All of the above |
Question 73 Explanation:
The DMA is most probably used when the performance of a system is to be increased.
Question 74 |
What is the value of the variable c after the switch statement in the C program given below?
x = 3
switch (x) {
case 1: c = ‘A’; break;
case 2: c = ‘B’; break;
case 3: c = ‘C’ break;
default: c = ‘F’; break;
}
F | |
C | |
A | |
B |
Question 74 Explanation:
since the value of x is 3 so case 3 will be executed and then break will make the execution to get out of the loop and C will be in the variable ‘c’.
Question 75 |
Which of the following sorting algorithms does not have a worst case running time of O(n2)?
Bubble Sort | |
Quick Sort | |
Merge Sort | |
Heap Sort |
Question 75 Explanation:
worst case time complexity of mergesort is O(nlogn).
Question 76 |
Match the following asymptotic notations used in the time and space analysis of algorithms-with their meanings
A: O-notation
B: Θ-notation
C: Ω-notation
I. Greater than or equal to (“≥”)
II. Less than or equal to (“≤”)
III. Equal to (“=”)
A-III, B-II, C-I | |
A-II, B-III, C-I | |
A-I, B-II, C-III | |
None |
Question 76 Explanation:
O-notation is less than or equal to.
Θ-notation is equal to.
Ω-notation is greater than or equal to.
Θ-notation is equal to.
Ω-notation is greater than or equal to.
Question 77 |
BNF notation in introduced by
Booth and Niklaus Wirth | |
John Backus and Peter Naur | |
Booth and Peter Naur | |
John Backus and Niklaus Wirth |
Question 77 Explanation:
Full form of BNF is Backus Naur Form ,which is a notation technique for context-free grammars .So clearly option 2 is the correct answer.
Question 78 |
The output of a lexical analyzer is
Machine Code | |
Intermediate Code
| |
A Stream of Tokens | |
A Parse Tree |
Question 78 Explanation:
The output of a lexical analyzer is a stream of token which is given as input to syntax analyzer.
Question 79 |
Multiprogramming means
Executing more than one program at a time | |
Ability to accommodate multiple tasks in main memory | |
Presence of multiple processors in one system | |
All the above |
Question 79 Explanation:
Multiprogramming means the ability to put aor place more than one process in the main memory.
Question 80 |
With regard to the expressive power of the formal relational query languages, which of the following is true
Relational algebra is more powerful than relational calculus | |
Relational algebra has the same power as relational calculus | |
Relational algebra has the same power as safe relational calculus | |
None of these |
Question 80 Explanation:
We can't just simply say that Relational algebra has the same power as relational calculus,because relational calculus has some unsafe state . So the correct statement will be Relational algebra has the same power as safe relational calculus.
Question 81 |
In the context of computer networks, which of the following is false?
In OSI model, network layer accepts messages from sessions layer and passes it to transport layer | |
Fiber optic devices for transmission have higher bandwidth than copper based devices | |
A set of layers and protocol | |
In the context of network architecture, a service is a set of primitive operations that a layer provides to the layer above it |
Question 81 Explanation:
is false.The correct statement will be the transport layer accepts the message from session layer and passes it to the network layer.
Question 82 |
Expansion for DES, a most widely used encryption algorithm, is
Digital Encryption Standard
| |
Digital Encryption Specification
| |
Data Encryption Standard | |
Data Encryption Specification |
Question 82 Explanation:
Full form of DES is Data Encryption Standard.
Question 83 |
A processor needs software interrupt to
Test the interrupt system of the processor | |
Implement co-routines | |
Obtain system services which need execution of the privileged instructions | |
Return from subroutines
|
Question 83 Explanation:
A processor needs software interrupt to Obtain system services which need execution of the privileged instructions
Question 84 |
Quick sort is run on two inputs shown below to sort in ascending order:
I : 1,2,3,…n II : n, n-1,…, 2, 1
Let k1 and k2 be the number of comparisons made for the inputs I and II respectively. Then
k1 < k2 | |
k1 = k2 | |
k1 > k2 | |
None |
Question 84 Explanation:
In quick sort whether the inputs are in descending order or ascending order, it will have the worst case comparisons and will be equal no. of comparisons.
Question 85 |
Which of the following time complexities is said to be exponential?
N2 | |
2N | |
N3 | |
N log N |
Question 85 Explanation:
The time complexity is said to be exponential when it is of the form (k^N) ,where k is some constant.
Hence option 2 is the correct answer.
Question 86 |
If the two finite state machines are equivalent, then they should have the same number of
States | |
Edges | |
States and Edges
| |
None of the above |
Question 86 Explanation:
If two finite state machines are equivalent then they will accept the same language .They miht have different no. of states or edges.
Question 87 |
Operating System is a
Software | |
Hardware | |
Firmware | |
Combination of all the above |
Question 87 Explanation:
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs
Question 88 |
Match the following
A:Secondary Index
B:Non-procedural Query language
C:Closure of a Set of Attributes
D:Natural-join
I. Functional Dependency
II. B-Tree
III. Domain Calculus
IV. Relational algebraic Operations
A-II, B-III, C-I, D-IV | |
A-III, B-II, C-IV, D-I | |
A-III, B-I, C-II, D-IV | |
A-II, B-I, C-III, D-IV |
Question 88 Explanation:
B-tree is a form of secondary index.
Domain calculus is a non-procedural query language or declarative language.
Functional dependency is related to closure of set of attributes.
Natural join is relational algebraic operations.
Domain calculus is a non-procedural query language or declarative language.
Functional dependency is related to closure of set of attributes.
Natural join is relational algebraic operations.
Question 89 |
The main purpose of encryption is to provide
Data Security | |
Data Integrity | |
Data Redundancy | |
(1) and (2) |
Question 89 Explanation:
The main purpose of encryption is to provide data confidentiality or data security.
Question 90 |
Which of the following is false?
Public-key cryptography is also known as asymmetric cryptography | |
Asymmetric cryptography uses a pair of cryptographic keys
| |
A message encrypted with the private key can be decrypted only with the corresponding public key | |
The private key is kept secret, while the public key is widely distributed |
Question 90 Explanation:
3 is false because a message encrypted with the private key can be decrypted only with the corresponding public key in asymmetric key cryptography but in symmetric key cryptography a message encrypted with the private key can be decrypted only with the same private key.
There are 90 questions to complete.