Practices Problem
Practices Problem
Exam Batch-2023
MCQ Page22 Practices Problem
Practices Problem
C Programming
What does the given program print?
char c[ ] = “GATE2011”
char *p = c;
printf (“%s”, p + p[3] – p[1]);
a) GATE 2011
b) 2011
c) E2011
d) 011
Ans.: b
Explanation
// p[3] is 'E' and p[1] is 'A'.
// p[3] - p[1] = ASCII value of 'E' - ASCII value of 'A' = 4
// So the expression p + p[3] - p[1] becomes p + 4 which is
// base address of string "2011"
Or let the address of p is 2000 so, 2000+E-A=2000+4=2004= p[4]=2
Which of the following option is correct if we want to exchange the values of x and y
variables.
a) We need to call Swap(x,y)
b) we need to call call swap(&x,&y)
c) We can not call swap (x,y) because it does not return any value
d) We can not call swap (x,y) because parameters are passed by value
Ans.: d
Explanation:
Option a, b and c are incorrect because of following reason.
(a) We need to call Swap(x,y)
MCQ Page33 Practices Problem
(b) we need to call call swap(&x,&y)
(c) We can not call swap (x,y) because it does not return any value
In order to exchange the value of x and y we should call swap(&x, & y) but for it’s working at the
time of function definition we should pass parameter as pointer it means we should define void
swap( int *x, int*y)
So function call Swap(x,y) can not not be used because parameter are passed as value instead of
pointer types arguments.
In the standard library of C programming language, which of the following header file is
designed for basic mathematical operations?
a) math.h
b) conio.h
c) dos.h
d) stdio.h
Ans. : a
Explanation
math.h is a header file in the standard library designed for basic mathematical operations
printf("%c", 100);
a) prints 100
b) prints ASCIl equivalent of 100
c) prints garbage
d) none of the above
Ans.: b
printf ("%d\n", 100); // prints 100
printf ("%c \ n", 100) / prints "d" the ASCII character represented by 100
The call by value method of passing arguments to a function copies the actual value of an
argument into the formal parameter of the function. In this case, changes made to the parameter
MCQ Page44 Practices Problem
inside the function have no effect on the argument. By default, C programming language uses call
by value method to pass arguments.
Ans.: d
All are valid declarations.
Determine Output?
void main()
{
int const *p=5;
printf("%d", ++(*p));
}
a) 6
b) 5
c) Garbage Value
d) Compiler Error
Ans.: d
MCQ Page55 Practices Problem
Explanation: p is a pointer to a "constant integer". We can not change the value of constant. But
we tried to change the value of the "constant integer".
‘ptr data’ is a pointer to a data type. The expression *ptr data++ is evaluated as (in C++):
a)*(ptr data++)
b) (*ptr data)++
c)*(ptr data)++
d)Depends on compiler
Ans: (a)
a) 5 9
b) 7 20
c) 5 20
d) 8 20
Ans.: c
Explanation
Length of the string is count of character upto ‘\0’. sizeof – reports the size of the array.
Consider an array representation of an n element binary heap where the elements are
stored from index 1 to index n of the array. For the element stored at index i of the array
(i<=n), the index of the parent is:
a)floor (i+1)/2)
Ceiling (i+1)/2)
Floor (i/2)
Ceiling (i/2)
Ans: (c)
The -------- memory allocation function modifies the previous allocated space
a) calloc() b) free() c) malloc d) realloc()
Ans.: d
malloc () and calloc () are used to allocate dynamic memory.
free () is used to frees allocated memory.
realloc () is used to reallocates or modifies the previous allocated space.
Ans.: d
A pointer is a memory address. Suppose the pointer variable has p address 1000, and that p
is declared to have type int*, and an int is 4 bytes long. What address is represented by
expression p + 2?
a) 1002
b) 1004
c) 1006
d) 1008
Ans.: d
How many bytes does "int = D" use?
a) 0
b) 1
c) 2 or 4
d) 10
Ans. : c
Explanation: The int type takes 2 or 4 bytes.
MCQ Page77 Practices Problem
Data Structure
How can we describe an array in the best possible way?
a) The Array shows a hierarchical structure.
b) Arrays are immutable.
c) Container that stores the elements of similar types
d) The Array is not a data structure
Ans.: c
Explanation: The answer is c because array stores the elements in a contiguous block of memory
of similar types. Therefore, we can say that array is a container that stores the elements of similar
types.
Heap allocation is required for languages that:
a) Use dynamic scope rules
b) Support dynamic data structure
c) Support recursion
d) Support recursion and dynamic data structures
Ans: (b)
Explanation:
Heap allocation is required to languages that support dynamic data structure.
A text is made up, of the characters a, b, c, d, e each occurring with the probability 0.11,
0.40, 0.16, 0.09 and 0.24 respectively. The optimal Huffman coding technique will have the
average length of:
a) 2.40
b) 2.16
c) 2.26
d) 2.15
Ans: (b)
The following numbers are inserted into an empty binary search tree in the given order :
10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree?
a) 3
b) 4
c) 5
d) 6
Ans: (a)
A list of n strings, each of length n, is sorted into lexicographic order using merge - sort
algorithm.
The worst case running time of this computation is:
a) O(n log n)
b) O(n2 log n)
c) O(n2 + log n)
d) O(n3)
Ans: (b)
Explanation:
MCQ Page88 Practices Problem
Since the list contains ‘n’ string, each of length ‘n’. Take 1st character of each string and sort it
and place sorted strings into output list, doing this for n times will sort all the strings into one list,
so time complexity= n.(n log n)=O(n2 log n)
Note: First sort each string individually in list will take O(n log n) time more.
According to Knuth's definition, a B-tree of order m is a tree which satisfies the following
properties:
✓ Every node has at most m children.
✓ Every non-leaf node (except root) has at least [m/2]children.
✓ The root has at least two children if it is not a leaf node.
MCQ Page10
10 Practices Problem
✓ A non-leaf node with k children contains (k- 1) keys.
✓ All leaves appear in the same level.
It can not be guaranteed in binary tree, AVL tree and expression tree.
Which one of the following is the correct way to increment the rear end in a circular
queue?
a) rear =rear+1
b) (rear+1) % max
c) (rear % max) + 1
d) None of the above
Ans. : b
Explanation: The answer is b. It ensures that the rear will have the value from 0 to max-1; if the
rear end points to the last position, and we increment the rear end using (rear+1) % max, then rear
will point to the first position in the queue.
The time complexities of some standard grapn algorithms are given. Match each algorithm
with its time complexity ? (n and m are no. of nodes and edges respectively)
List-l List-Il
A. Bellman Ford algorithm 1. O(m log n)
B. Kruskals algorithm 2. O(n3)
C. Floyd Warshall algorithm 3. O(mn)
D. Topological sorting 4. O(m+ n)
Code :
A B C D
(a) 3 1 2 4
(b) 2 4 3 1
(c) 3 4 1 2
(d) 2 1 3 4
Ans.: a
Which of the following is true for computation time in insertion, deletion and finding
maximum and minimum element in a sorted array?
a) Insertion - 0(1), Deletion -0(1), Maximum -0(1), Minimum -0(1).
b) Insertion -0(1), Deletion -0(1), Maximum - 0(n), Minimum -0(n).
c) Insertion -0(n), Deletion -0(n), Maximum -0(1), Minimum -0(1).
d) Insertion -0(n), Deletion -0(n), Maximum -0(n), Minimum -0(n).
Ans: (c)
Explanation:
For sorted array:
Insertion will take = o(n)
Deletion will take = o(n)
Maximum will take = o(1)
MCQ Page11
11 Practices Problem
Minimum will take = o(1)
The seven elements A, B, C, D, E, F and G are pushed onto a stack in reverse order, i.e.,
starting from G. The stack is popped five times and each element is inserted into a queue.
Two elements are deleted from the queue and pushed back onto the stack. Now, one element
is popped from the stack. The popped item is_____.
a) A
b) B
c) F
d) G
Ans: (b)
Which of the following statements is false?
a) Optimal binary search tree construction can be performed efficiently using dynamic
programming.
b) Breadth-first search cannot be used to find the connected components of a graph.
c) Given the prefix and postfix walks of a binary tree, the tree cannot be re-constructed
uniquely.
d) Depth-first-search can be used to find the connected components of a graph.
Ans: (b)
The number of different binary trees with 6 nodes is _____.
a) 6
b) 42
c) 132
d) 256
Ans: (c)
Networking
"Parity bits" are used for which of the following purposes?
a) Encryption of data
b) To transmit faster
c) To detect errors
d) To identify the user
Ans. : (c) To detect errors
Explanation: The parity bit is also known as the check bit, and has a value of 0 or 1. It is used for
error detection for blocks of data.
Which software prevents the external access to a system?
a) Firewall
b) Gateway
c) Router
d) Virus checker
Ans.: (a) Firewall
MCQ Page13
13 Practices Problem
Explanation: A firewall is a network securing software that prevents unauthorized users and
dangerous elements from accessing the network. Software firewall acts as a filter for our network
which prevents harmful information.
If a file consisting of 50,0000 characters takes 40 seconds to send, then the data rate is
a) 1 kbps
b) 1.25 kbps
c) 2 kbps
d) 10 kbps
Ans: (d)
Match the following:
List-1 List-2
A. Data link layer 1. Encryption
B. Network layer 2.Connection control
C. Transport layer 3. Routing
D. Presentation layer 4. Framing
Codes:
A B C D
a. 4 3 1 2
b. 3 4 2 1
c. 4 2 3 1
d. 4 3 2 1
Ans: (d)
Explanation:
. Data link layer-Framing
. Network layer-Routing
. Transport layer-Connection control
. Presentation layer-Encryption
Which of the following device and takes data sent from one network device and forwards it
to the destination node based on MAC address?
a) Hub
b) Modem
c) Switch
d) Gateway
Ans: (c)
_____ do not take their decisions on measurements or estimates of the current traffic and
topology.
a) Static algorithms
b) Adaptive algorithms
c) Non-adaptive algorithms
d) Recursive algorithms
Ans: (c)
Which of the following layers of the OSI Reference model is also called end-to-end layer?
a) Network layer
b) Data Link layer
MCQ Page14
14 Practices Problem
c) Session layer
d) Transport layer
Ans: (d)
Explanation:
Data link layer: Node to Node
Network layer: Host to Host
Transport layer: End to End
In a packet switching network, if the message size is 48 bytes and each packet contains a
header of 3 bytes. If 24 packets are required to transmit the message, the packet size is ___
a) 2 bytes
b) 1 byte
c) 4 bytes
d) 5 bytes
Ans: (d)
Match the following Layers and Protocols for a user browsing with SSL:
List-1 List-2
A. Application of layer 1. TCP
B. Transport layer 2. IP
C. Network layer 3. PPP
D. Data Link layer 4. HTTP
Codes:
A B C D
a) 4 1 2 3
b) 3 2 1 4
c) 2 3 4 1
d) 3 1 4 2
Ans: (a)
Explanation:
✓ HTTP is an application layer protocol.
✓ TCP is a transport layer protocol.
✓ IP is a network layer protocol.
✓ PPP is a data link layer protocol.
Match the following:
List-1
A. Line coding
B. Block coding
C. Scrambling
D. Pulse code modulation
List-2
1. A technique to change analog signals to digital data.
2. Provides synchronization without increasing the number of bits.
3. Process of converting digital data to digital signal.
4. Provides redundancy to ensure synchronization and inherits error detection.
Codes:
A B C D
MCQ Page15
15 Practices Problem
a) 4 3 2 1
b) 3 4 2 1
c) 1 3 2 4
d) 2 1 4 3
Ans: (b)
Ans.: c
HTTP: is a application layer protocol
TCP: is transport layer protocol
BGP: Border Gateway Protocol (BGP) is a etwork layer protocol
HDLC: High-level Data Link Control (HDLC) is data link layer protocol.
Ans.: d
Switch are hardware based and bridges are software based both works upto layer 2.
Packet is PDU (protocol data unit) at layer 3 of OSI model.
A router is a networking device that forwards data packets between computer networks.
Routers performs the traffic directing functions on the internet. A data packet is typically
forwarded from one router to another through the networks that consitude the internetwork until it
reaches its destination node. Router works at layer 3 of OSI model.
MCQ Page16
16 Practices Problem
Both hosts and routers are TCP/IP protocol software. However, routers do not use protocol from
all layers. The layer for which protocol software is not needed by a router is
a) Layer-5 (Application)
b) Layer- 1 (Physical)
c) Layer-3 (Internet)
d) Layer-2 (Network Interface)
Ans.:a
Routers work upto layer 3 of TCP/IP model means physical, data link and network layer.
Decryption and encryption of data are the responsibility o which of the following layer?
a) Physical layer
b) Data link layer
c) Presentation Layer
d) Session Layer
Ans. c
Which Layer of OSI reference model uses the ICMP (Internet Control Message Protocol)?
a) Transport layer b) Data Link Layer c) Network Layer d) Application Layer
Ans.: c
An analog signal carries 4 bits in each signal unit. If 1000 signal units are sent per second,
then baud rate and bit rate of the signal are--------and--------
a) 4000 bauds / sec & 1000 bps
b) 2000 bauds / sec & 1000 bps
c) 1000 bauds / sec & 500 bps
d) 1000 bauds / sec & 4000 bps
Ans.: d
Bit rate is the number of bits per second.
Baud rate is the number of signal units per second. Baud rate is less than or equal to the bit
rate.
Baud rate=1000 baud / sec
Bit rate = 1000 x 4 = 4000 bps
A subset of a network that includes all the routers but contains no loops is called ________
a) spanning tree
b) spider structure
c) spider tree
d) special tree
Ans :(a)
Explanation:
Spanning tree protocol (STP) is a network protocol that creates a loop free logical topology for
ethernet networks. It is a layer 2 protocol that runs on bridges and switches. The main purpose of
STP is to ensure that you do not create loops when you have redundant paths in your network.
Page Shift Keying (PSK) Method is used to modulate digital signal at 9600 bps using 16
level. Find the line signals and speed (i.e. modulation rate).
a) 2400 bauds b) 1200 bauds
c) 4800 bauds d) 9600 bauds
Ans.: a
Explanation:
In Phase Shift Keying (PSK) using 16 level = 24
Means 4 bits needed for signal unit.
MCQ Page18
18 Practices Problem
Given, bit rate = 9600 bps
So, baud signal rate
=9600/4=2400bauds/s
DHCP uses UDP port _________ for sending data to the server.
a) 66
b) 67
c) 68
d) 69
Ans :(b)
Explanation:
67 is the UDP port number that is used as the destination port of a server. Whereas UDP port
number 68 is used by the client.
What is the main advantage of UDP?
a) More overload
b) Reliable
c) Low overhead
d) Fast
Ans :(c)
Explanation:
As UDP does not provide assurance of delivery of packet, reliability and other services, the
overhead taken to provide these services is reduced in UDP’s operation. Thus, UDP provides low
overhead and higher speed.
What is the header size of a UDP packet?
a) 8 bytes
b) 8 bits
c) 16 bytes
d) 124 bytes
Ans :(a)
Explanation:
The fixed size of the UDP packet header is 8 bytes. It contains four two-byte fields: Source port
address, Destination port address, Length of packet, and checksum.
First address in a block is used as network address that represents the ________
a) Class Network
b) Entity
c) Organization
d) Codes
Ans :(c)
Explanation:
First address in a block is used as a network address that represents the organization. The network
address can be found by AND’ing any address in the block by the default mask. The last address
in a block represents the broadcast address.
IPv6 does not use _________ type of address.
a) broadcast
b) multicast
MCQ Page19
19 Practices Problem
c) anycast
d) unicast
Ans :(a)
Explanation:
There is no concept of broadcast address in IPv6. Instead, there is an anycast address in IPv6
which allows sending messages to a group of devices but not all devices in a network. Anycast
address is not standardized in IPv4.
Which of the following IP address class is a multicast address?
b) Class A b) Class B c) Class C d) Class D
The application-level protocol in which a few manager stations control a set of agents is
called ______
a) HTML
b) TCP
c) SNMP
d) SNMP/IP
Ans :(c)
Explanation:
SNMP stands for Simple Network Management Protocol. It is an application-level protocol in
which a few manager stations control a set of agents. It is used under the TCP/IP protocol suite
and is used for managing devices on the internet.
To use a Simple Network Management System, we need _______
a) Servers
b) IP
c) Protocols
d) Rules
Ans :(d)
Explanation:
Rules are a collection of expression containing parameters to observe the attributes of the user’s
device, and then execute some actions. It specifies the parameters for the managed objects inside
the application and performs operations that would support the expression. The input of a rule
may be many expressions or even a single expression that end in an output of single object
invoking some action.
If you wanted to have 12 subnets with a Class C network ID, which subnet mask would you
use?
a) 255.255.255.252
b) 255.255.255.255
c) 255.255.255.240
d) 255.255.255.248
Ans :(c)
Explanation:
If you have eight networks and each requires 10 hosts, you would use the Class C mask of
255.255.255.240. Why? Because 240 in binary is 11110000, which means you have four subnet
bits and four host bits. Using our math, we’d get the following:
24-2=14 subnets
MCQ Page20
20 Practices Problem
24-2=14 hosts.
Which of the following explains Cookies nature?
a) Non Volatile
b) Volatile
c) Intransient
d) Transient
Ans :(d)
Explanation:
Cookies are transient by default; the values they store last for the duration of the web browser
session but are lost when the user exits the browser. While the browsing session is active the
cookie stores the user values in the user’s storage itself and accesses them.
Microprocessor
List-I List-II
a. Indexed i. is not used when an operand is moved
Addressing from memory into a register or from a
register to memory.
b. Direct ii. Memory address is computed by adding up two
Addressing registers plus an (optional) offset.
c. Register iii. Addressing memory by giving a register plus a
Addressing content offset.
d. Base- iv. can only be used to access global variables whose
Indexed Addressing address is known at compile time.
MCQ Page22
22 Practices Problem
Codes :
a b c d
a) ii i iv iii
b) ii iv I iii
c) iii iv i ii
d) iii i iv ii
Ans.: c
While programming for any type of interrupt, the interrupt vector table is set
a) externally
b) through a program
c) either externally or through the program
d) externally and through the program
Ans: (c)
Explanation:
The programmer must, either externally or through the program, set the interrupt vector table for
that type preferably with the CS and IP addresses of the interrupt service routine.
The technique that is used to pass the data or parameter to procedures in assembly
language program is by using
a) global declared variable
b) registers
c) stack
d) all of the mentioned
Ans: (d)
Explanation:
MCQ Page23
23 Practices Problem
The techniques that are used to pass the data or parameter to procedures are by using global
declared variable, registers of CPU, memory locations, stack, PUBLIC & EXTRN.
The instructions which after execution transfer control to the next instruction in the
sequence are called
a) Sequential control flow instructions
b) control transfer instructions
c) Sequential control flow & control transfer instructions
d) none of the mentioned
Ans: (a)
Explanation:
The sequential control flow instructions follow sequence order in their execution.
Which of the following is not a data copy/transfer instruction?
a) MOV
b) PUSH
c) DAS
d) POP
Ans: (c)
Explanation:
DAS (Decimal Adjust after Subtraction) is an arithmetic instruction.
In PUSH instruction, after each execution of the instruction, the stack pointer is
a) incremented by 1
b) decremented by 1
c) incremented by 2
d) decremented by 2
Ans: (d)
Explanation:
The actual current stack-top is always occupied by the previously pushed data. So, the push
operation decrements SP by 2 and then stores the two bytes contents of the operand onto the
stack.
The instructions that are used for reading an input port and writing an output port
respectively are
a) MOV, XCHG
b) MOV, IN
c) IN, MOV
d) IN, OUT
Ans: (d)
Explanation:
The address of the input/output port may be specified directly or indirectly.
Example for input port: IN AX, DX; This instruction reads data from a 16-bit port whose address
is in DX and stores it in AX
Example for output port: OUT 03H, AL; This sends data available in AL to a port whose address
is 03H.
The instruction that pushes the flag register on to the stack is
a) PUSH
b) POP
MCQ Page24
24 Practices Problem
c) PUSHF
d) POPF
If every non-key attribute is functionally dependent on the primary key, then the relation is
in
a) First normal form
b) Second normal form
c) Third normal form
d) Fourth normal form
Ans: (b)
Which of the following is/are true with reference to ‘view’ in DBMS?
A. A ‘view’ is a special stored procedure executed when a certain event occurs.
B. A ‘view’ is a virtual table, which occurs after executing a pre-compiled query.
Code:
a) Only (A) is true
b) Only (B) is true
c) Both (A) and (B) are true
d) Neither (A) or (B) are true
Ans: (b)
In SQL, _____ is an Aggregate function.
a) SELECT
MCQ Page25
25 Practices Problem
b) CREAT
c) AVG
d) MODIFY
Ans: (c)
Which level of Abstraction describes wha data are stored in the Database?
a) Physical level b) View Level
c) Abstraction level d) Logical level
Ans.: d
Match the following with respect to RDBMS:
List-1
A. Entity integrity
B. Domain integrity
C. Referential integrity
D. User Defined integrity
List-2
1. Enforces some specific business rules that do not fall into entity or domain.
2. Rows can’t be deleted which are used by other records.
3. Enforces valid entries for a column
4. No duplicate rows in a table.
Code:
A B C D
A) 3 4 1 2
b) 4 3 2 1
c) 4 2 3 1
d) 2 3 4 1
Ans: (b)
Explanation:
. Entity integrity is the mechanism the system provides to maintain primary keys. Also ensures
the primary key of a row is unique and it does not match the primary key of any other row in the
table.
. Domain integrity specifies that all columns in a relational database must be declared upon a
defined domain i.e. enforce valid entries for a domain.
. Referential integrity is RDBMS concept which says the relationship between tables must be
consistent i.e. any foreign key that is referenced by the foreign key. Also force that rows can’t be
deleted which are used by other records.
. User defined integrity enforce some specific business rules that do not fall into entity or
domain.
In RDBMS, different classes of relations are created using ______ technique to prevent
modification anomalies.
a) Functional Dependencies
b) Data integrity
c) Referential integrity
d) Normal Forms
Ans: (d)
MCQ Page26
26 Practices Problem
Based on the cardinality ratio and participation---------- associated with a relationship type,
choose either the Foreign Key Design, the Cross Referencing Design or Mutual Referencing
Design.
a) Entity b) Constraints
c) Rules d) Keys
Ans. b
The term "NTFS" refers to which one of the following?
a) New Technology File System
b) New Tree File System
c) New Table type File System
d) Both A and C
Ans. : a
Explanation: In the old operating systems, the file structure used to store and manage files is
called the FAT 32 ( or File Allocation Table). Later, when the technology evolves with time, a
new type of file system is introduced, known as the New Technology File System. It overcomes
all the drawbacks, issues that exist in FAT file architecture and has many other new features such
as it is fast, it can handle files whose size is even greater than 4 GB.
Consider the table Student (stuid, name, course, marks).Which one of the following two
queries is correct to find the highest marks student in course 5 ?
Q.1. Select S.stuid From student S Where not exists
(select ∗ from student e where e course = ‘5’ and e marks ≥ s marks)
Q.2. Select s.stu.id From student S Where s ⋅ marks > any
(select distinct marks from student S where s ⋅ course = 5)
a) Q. 1
b) Q. 2
c) Both Q. 1 and Q. 2
d) Neither Q. 1 nor Q. 2
Both the queries are not correct since, first query will not retrieve any tuple since N condition is
used. Second query gives stuid of students whose marks are greater than any who is student
taking course 5.
Correct queries should be as following:
Q: Select S.stuid From student S where not exist (select * From student e where e.course%=D'5'
and e.marks > S.marks)
Q,: Select S.stuid From student S where S.marks 2 All (select distinct marks
From student S where S.course = '5')
Which of the following creates a virtual relation for storing the query?
a) Function
b) View
c) Procedure
d) None of the mentioned
Ans: (b)
Explanation:
Any such relation that is not part of the logical model, but is made visible to a user as a virtual
relation, is called a view.
What type of join is needed when you wish to include rows that do not have matching
values?
a) Equal-join
b) Natural join
c) Outer join
d) All of the mentioned
Ans: (c)
Explanation:
MCQ Page29
29 Practices Problem
An outer join does not require each record in the two joined tables to have a matching record.
The deadlock state can be changed back to stable state by using _____________statement.
a) Commit
b) Rollback
c) Savepoint
d) Deadlock
Ans: (b)
Explanation:
Rollback is used to rollback to the point before lock is obtained.
The situation where the lock waits only for a specified amount of time for another lock to be
released is
a) Lock timeout
b) Wait-wound
c) Timeout
d) Wait
Ans: (a)
Explanation:
The timeout scheme is particularly easy to implement, and works well if transactions are short
and if longwaits are likely to be due to deadlocks.
If we want to retain all duplicates, we must write ________ in place of union.
a) Union all
b) Union some
c) Intersect all
d) Intersect some
Ans: (a)
A __________ is a special kind of a stored procedure that executes in response to certain
action on the table like insertion, deletion or update of data.
a) Procedures
b) Triggers
c) Functions
d) None of the mentioned
Ans: (b)
Which of the following is NOT an Oracle-supported trigger?
a) BEFORE
b) DURING
c) AFTER
d) INSTEAD OF
Ans: (b)
___________ refers to the ability of the system to recover committed transaction updates if
either the system or the storage media fails.
a) Isolation
b) Atomicity
c) Consistency
d) Durability
Ans: (d)
MCQ Page30
30 Practices Problem
Explanation:
In database systems, durability is the ACID property which guarantees that transactions that have
committed will survive permanently.
Which of the following object types below cannot be replicated?
a) Data
b) Trigger
c) View
d) Sequence
Ans: (d)
Explanation:
Sequence is a series of items which is like a unique index.
Software Engineering
What is the normal order of activities in which traditional software testing is organized?
a) Integration Testing
b) System Testing
c) Unit Testing
d) Validation Testing
Code:
a. 3, 1, 2, 4
b. 3, 1, 4, 2
c. 4, 3, 2, 1
d. 2, 4, 1, 3
Ans: (d)
Which of the following testing techniques ensures that the software product runs correctly
after the changes during maintenance?
a) Path Testing
b) Integration Testing
c) Unit Testing
d) Regression Testing
Ans: (d)
Ans.: b
Validation: Are we building the right product?
Verification: Are we building the product right?
The ___ model is preferred for software development when the requirements are not clear.
a) Rapid Application Development
b) Rational Unified Process
c) Evolutionary Model
d) Waterfall Model
Ans: (c)
Which of the following is not included in the waterfall model?
a) Requirement analysis
b) Risk analysis
c) Design
d) Coding
Ans: (b)
Explanation:
MCQ Page32
32 Practices Problem
The waterfall model is a sequential (non-iterative) process, it includes requirements, design,
implementation, verification and maintenance. Risk analysis used in spiral models.
Debugging is:
a) creating program code
b) finding and correcting errors in the program code
c) identifying the task to be computerized
d) creating the algorithm
Ans: (b)
Explanation:
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a
computer program or a piece of electronic hardware, thus making it behave as expected.
Which two models don't allow defining requirements early in the cycle?
a) Waterfall & RAD
b) Prototyping & Spiral
c) Prototyping & RAD
d) Waterfall & Spiral
Ans: (b)
Explanation:
Prototyping Model starts with a requirements analysis phase including techniques like FAST,
QFD, Brainstorming.In case of Spiral model the first phase involves activities related to customer
communication like determining objectives.
What is Cyclomatic complexity?
a) Black box testing
b) White box testing
c) Yellow box testing
d) Green box testing
Ans: (b)
Explanation:
Cyclomatic complexity measures the amount of decision logic in the program module.Cyclomatic
complexity gives the minimum number of paths that can generate all possible paths through the
module.
Equivalence partitioning is a ______ method that divides the input domain of a program
into classes of data from which test cases can be derived
a) White-box testing
b) Black-box testing
c) Orthogonal array testing
d) Stress testing
Ans.: b
Ans.: c
Testing of software with actual data and in actual environment is called
a) Alpha testing
b) Beta testing
c) Regression testing
d) None of the above
Ans.: b
A beta test is the second phase of software testing in which a sampling of the intended
the audience tries the product-out.
Alpha test meant the first phase of testing in a software development process.
Computer Architecture
Ans.: d
Given, (292),0= (1204),
Convert it into decimal
= (292)10 = 1.x3+ 2.x2 + 0.x1+ 4.x0
Or,x3 + 2x2 + 4x0 = 292
Or, x³ + 2x2 + 4 = 292
Or, x3 + 2x2- 288 = 0
Or, x=6
Convert the octal number 0.4051 into its equivalent decimal number.
a) 0.5100098
b) 0.2096
c) 0.52
d) O.4192
Ans: (a)
The hexadecimal equivalent of the octal number 2357 is:
a) 2EE
b) 2FF
c) 4EF
MCQ Page40
40 Practices Problem
d) 4FE
Ans: (c)
Which of the following is a sequential circuit?
a) Multiplexer
b) Decoder
c) Counter
d) Full adder
Ans: (c)
Explanation:
The counter circuit is usually constructed of a number of flip-flops connected in cascade.
Counter is a sequential logic device that will go through a certain predefined states based on the
application of the input pulses.
Multiplexer, decoder and full adder are examples of combinational circuit.
A multiplexer combines four 100 Kbps channels using a time slot of 2 bits. What is the bit
rate?
a) 100kbps
b) 200kbps
c) 400kbps
d) 1000kbps
Ans: (c)
Object Oriented Programming
Codes:
a b c d
a. iii iv i ii
b. iv iii ii i
c. ii iv i iii
d. ii iii iv i
Ans.: a
The mechanism that binds code and data together and keeps them secure from outside
world is known as
a) Abstraction
c) Encapsulation
b) Inheritance
d) Polymorphism
-------allows to create classes which are derived from other classes, so that they
automatically include some of its "parent's" members, plus its own members.
a) Overloading b) Inheritance
c) Polymorphism d) Encapsulation
Which function among the following can’t be accessed outside the class in java in same package?
a) public void show()
b) void show()
c) protected show()
d) static void show()
Answer: c
Explanation: The protected members are available within the class. And are also available in
derived classes. But these members are treated as private members for outside the class and
inheritance structure. Hence can’t be accessed.
What is the output of the following java code?
}
Public static void main(String[] args)
{
Car b=new Audi();
MCQ Page42
42 Practices Problem
b.run();
}
}
a) car is running b) Audi is running c)both d)None
Ans.: b
If same message is passed to objects of several different classes and all of those can respond
in a different way, what is this feature called?
a) Inheritance
b) Overloading
c) Polymorphism
d) Overriding
Ans.: c Other
Ans.: b
The threat environment for E-commerce data warehousing applications, security threats can be
grouped into three major categories:
✓ Loss of data secrecy
✓ Loss of data integrity
✓ Loss of denial of service
The overall E-commerce strategy drives the e-commerce data warehousing strategy.
And.: b
The increasing processing power and sophistication of analytical tools and techniques have
results in the development of what are known as data warehouse. These data warehouses
Provide storage, functionality and responsiveness to queries behind the capabilities of
transactions oriented databases.
MCQ Page44
44 Practices Problem
Software Engineering
Which of the following testing techniques ensures that the software product runs correctly
after the changes during maintenance?
e) Path Testing
f) Integration Testing
g) Unit Testing
h) Regression Testing
Ans: d
What is the normal order of activities in which traditional software testing is organized?
e) Integration Testing
f) System Testing
g) Unit Testing
h) Validation Testing
Code:
e. 3, 1, 2, 4
f. 3, 1, 4, 2
g. 4, 3, 2, 1
h. 2, 4, 1, 3
Ans: d
Ans.: b
Validation: Are we building the right product?
Verification: Are we building the product right?
The ___ model is preferred for software development when the requirements are not clear.
e) Rapid Application Development
f) Rational Unified Process
MCQ Page46
46 Practices Problem
g) Evolutionary Model
h) Waterfall Model
Ans: c
Which of the following is not included in the waterfall model?
e) Requirement analysis
f) Risk analysis
g) Design
h) Coding
Ans: b
Explanation:
The waterfall model is a sequential (non-iterative) process, it includes requirements, design,
implementation, verification and maintenance. Risk analysis used in spiral models.
Debugging is:
e) creating program code
f) finding and correcting errors in the program code
g) identifying the task to be computerized
h) creating the algorithm
Ans: b
Explanation:
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a
computer program or a piece of electronic hardware, thus making it behave as expected.
Which two models don't allow defining requirements early in the cycle?
e) Waterfall & RAD
f) Prototyping & Spiral
g) Prototyping & RAD
h) Waterfall & Spiral
Ans: b
Explanation:
Prototyping Model starts with a requirements analysis phase including techniques like FAST,
QFD, Brainstorming.In case of Spiral model the first phase involves activities related to customer
communication like determining objectives.
What is Cyclomatic complexity?
e) Black box testing
f) White box testing
g) Yellow box testing
h) Green box testing
Ans: b
Explanation:
Cyclomatic complexity measures the amount of decision logic in the program module.Cyclomatic
complexity gives the minimum number of paths that can generate all possible paths through the
module.
Equivalence partitioning is a ______ method that divides the input domain of a program into
classes of data from which test cases can be derived
MCQ Page47
47 Practices Problem
e) White-box testing
f) Black-box testing
g) Orthogonal array testing
h) Stress testing
Ans.: b
Ans.: c
Testing of software with actual data and in actual environment is called
a) Alpha testing
b) Beta testing
c) Regression testing
d) None of the above
Ans.: b
A beta test is the second phase of software testing in which a sampling of the intended
the audience tries the product-out.
Alpha test meant the first phase of testing in a software development process.
MCQ Page48
48 Practices Problem
Which one of the following is a requirement that fits in a developer’s module ?
e) Availability
f) Testability
g) Usability
h) Flexibility
Ans: (b)
Explanation:
A developer needs to test his product before launching it into the market.
The SRS document is also known as _____________ specification.
e) black-box
f) white-box
g) grey-box
h) none of the mentioned
Ans: (a)
Explanation:
The system is considered as a black box whose internal details are not known that is, only its
visible external (input/output) behavior is documented.
Which one of the following is not a software process quality?
e) Productivity
f) Portability
g) Timeliness
h) Visibility
Ans: (b)
Explanation:
Portability is a software product quality which means software can run on different hardware
platforms or software environments.
A company is developing an advanced version of their current software available in the
market, what model approach would they prefer ?
e) RAD
f) Iterative Enhancement
g) Both RAD & Iterative Enhancement
h) Spiral
Ans: (c)
FAST stands for
e) Functional Application Specification Technique
f) Fast Application Specification Technique
g) Facilitated Application Specification Technique
h) None of the mentioned
Ans: (c)
Beta testing is done at
e) User’s end
f) Developer’s end
g) User’s & Developer’s end
h) None of the mentioned
Ans: (a)
MCQ Page49
49 Practices Problem
Explanation:
In beta testing the user evaluates the product and gives his feedback.
What DFD notation is represented by the Rectangle?
e) Transform
f) Data Store
g) Function
h) None of the mentioned
Ans: (b)
Which one of the following is not an agile method?
e) XP
f) 4GT
g) AUP
h) All of the mentioned
Ans: (b)
How many phases are there in Scrum?
e) Two
f) Three
g) Four
h) Scrum is an agile method which means it does not have phases
Ans: (b)
Explanation:
There are three phases in Scrum.The initial phase is an outline planning phase followed by a
series of sprint cycles and project closure phase.
The spiral model has two dimensions namely _____________ and ____________
e) diagonal, angular
f) radial, perpendicular
g) radial, angular
h) diagonal, perpendicular
Ans: (c)
Explanation:
The radial dimension of the model represents the cumulative costs and the angular dimension
represents the progress made in completing each cycle. Each loop of the spiral from X-axis
clockwise through 360o represents one phase.
Which of the following is a design pattern?
e) Behavioral
f) Structural
g) Abstract Factory
h) All of the mentioned
Ans: (d)