Create Account
Sign In
Toggle navigation
Home
Practice Exams
Official IQ Testing Hub
MCQ Learn
Board Exams
Learn
BISE Courses
Blog
About Us
Contact Us
01
:
10
:
00
Q:
1
/
78
🤖
Evaluating Your Answers
Please wait while our AI system evaluates your descriptive answers...
This may take a few moments.
⏳ Processing...
We're using advanced AI to provide detailed feedback on your answers.
Ruby Mock Test 5
Exam Duration:
01:10:00
Ruby Mock Test 5
: Question
1
of 78
Which class represents an Internet Protocol address?
1 Mark(s)
Your Answer:
InetAddress
InetAddress
Address
Address
IP Address
IP Address
TCP Address
TCP Address
Which of the following is NOT a delimiter for an input in scanf?
1 Mark(s)
Your Answer:
Enter
Enter
Space
Space
Tab
Tab
None of the mentioned
None of the mentioned
What will be the output of the following PHP code ? <?php $a = 10; $b = 4; $c = fun(10,4); function fun($a,$b) { $b = 3; return $a - $b + $b - $a; } echo $a; echo $b; echo $c; ?>
1 Mark(s)
Your Answer:
1040
1040
1410
1410
1400
1400
4100
4100
Derivative of 'Hy' where H is constant will be:
1 Mark(s)
Your Answer:
Hy
Hy
Hx
Hx
xy
xy
H
H
What is the role of the `ServletContextListener` interface in Java web applications?
1 Mark(s)
Your Answer:
To listen for context initialization and destruction events
To listen for context initialization and destruction events
To define JavaBean properties
To define JavaBean properties
To execute SQL queries
To execute SQL queries
To create JavaBeans
To create JavaBeans
Which of these method of class String is used to extract a single character from a String object?
1 Mark(s)
Your Answer:
CHARAT()
CHARAT()
chatat()
chatat()
charAt()
charAt()
ChatAt()
ChatAt()
Which Ruby module is commonly used for method delegation?
1 Mark(s)
Your Answer:
Delegator
Delegator
Delegate
Delegate
Forwardable
Forwardable
Proxy
Proxy
Which of the following methods is used to replace all occurrences of a specified character in a string in Java?
1 Mark(s)
Your Answer:
replace()
replace()
replaceAll()
replaceAll()
replaceChar()
replaceChar()
replaceAllOccurrences()
replaceAllOccurrences()
What is the output of the given code? age = 5 case age when 0 .. 2 puts "baby" when 3 .. 6 puts "little child" when 7 .. 12 puts "child" when 13 .. 18 puts "youth" else puts "adult" end
1 Mark(s)
Your Answer:
baby
baby
adult
adult
little child
little child
youth
youth
In Internet Protocol Version (IPv6), real-time audio or video, particularly in digital form, requires resources such as:
1 Mark(s)
Your Answer:
fixed bandwidth
fixed bandwidth
variable bandwidth
variable bandwidth
high bandwidth
high bandwidth
low bandwidth
low bandwidth
What does the term "MapReduce chaining" refer to in advanced MapReduce?
1 Mark(s)
Your Answer:
Execution of multiple MapReduce jobs in sequence
Execution of multiple MapReduce jobs in sequence
Chaining multiple Map and Reduce tasks in a single job
Chaining multiple Map and Reduce tasks in a single job
Combining multiple MapReduce jobs
Combining multiple MapReduce jobs
Parallel execution of Map tasks
Parallel execution of Map tasks
How can you determine if a queue is full when using a fixed-size array implementation?
1 Mark(s)
Your Answer:
By checking if the rear pointer is at the maximum capacity
By checking if the rear pointer is at the maximum capacity
By checking if the front pointer is equal to the rear pointer
By checking if the front pointer is equal to the rear pointer
By checking if the size equals the array size
By checking if the size equals the array size
By checking if the array is null
By checking if the array is null
Difference between a while and a do while loop:
1 Mark(s)
Your Answer:
A while and a do while loop are same
A while and a do while loop are same
A while loop works for discrete iterations
A while loop works for discrete iterations
A do while loop is more efficient
A do while loop is more efficient
Ado while loop always executes even if the condition is false whereas a while loop only works with t
Ado while loop always executes even if the condition is false whereas a while loop only works with t
What is the purpose of the #define directive in C preprocessing?
1 Mark(s)
Your Answer:
To include a header file
To include a header file
To define a macro
To define a macro
To declare a constant
To declare a constant
To declare a variable
To declare a variable
The network layer is responsible for the:
1 Mark(s)
Your Answer:
node to node communication
node to node communication
source to destination
source to destination
hop to hop communication
hop to hop communication
peer to peer transmission
peer to peer transmission
Ratio T2/a3 for Saturn is equals to:
1 Mark(s)
Your Answer:
3.01x10-34 y2/m3
3.01x10-34 y2/m3
2.98x10-34 y2/m3
2.98x10-34 y2/m3
2.96x10-34 y2/m3
2.96x10-34 y2/m3
2.99x10-34 y2/m3
2.99x10-34 y2/m3
The yellowness of the Taj Mahal is an effect of -
1 Mark(s)
Your Answer:
Acid rain
Acid rain
Allergens
Allergens
Ozone depletion
Ozone depletion
None of the above
None of the above
Which port is used by IMAP?
1 Mark(s)
Your Answer:
25
25
110
110
143
143
443
443
Suppose you are given a text right on MS Word and you have to align each line of the text on equal distance from left and right margins, which of the following alignment you will apply?
1 Mark(s)
Your Answer:
Justify
Justify
Align text left
Align text left
Align text right
Align text right
None of these
None of these
Which among the following is a correct statement about namespace used in C#.NET?
1 Mark(s)
Your Answer:
Classes must belong to a namespace, whereas structures need not
Classes must belong to a namespace, whereas structures need not
All elements of the namespace must to belong to one file
All elements of the namespace must to belong to one file
If not mentioned, a namespace takes the name of the current project
If not mentioned, a namespace takes the name of the current project
All of the mentioned
All of the mentioned
Which of the following is good coding practice to determine oddity? i) public boolen abc(int num) { return num % 2 == 1; } ii) public boolean xyz(int num) { return (num & 1)!= 0; }
1 Mark(s)
Your Answer:
i
i
ii
ii
(i) causes compilation error
(i) causes compilation error
(ii) causes compilation error
(ii) causes compilation error
What is the result of 8 / 2 ** 2 ?
1 Mark(s)
Your Answer:
1
1
8
8
4
4
16
16
Which property is used to add space inside the text field?
1 Mark(s)
Your Answer:
padding
padding
margin
margin
number
number
password
password
Background of screen is known as
1 Mark(s)
Your Answer:
application
application
window
window
desktop
desktop
frame
frame
When is the mouseover event fired?
1 Mark(s)
Your Answer:
When mouse is moved over a new element
When mouse is moved over a new element
When mouse is clicked
When mouse is clicked
When mouse is both moved and clicked
When mouse is both moved and clicked
None of the mentioned
None of the mentioned
How many types of Iterators are provided by C++?
1 Mark(s)
Your Answer:
2
2
3
3
4
4
5
5
The class from which the child class inherits is called. 1. Child class 2. Parent class 3. Super class 4. Base class
1 Mark(s)
Your Answer:
Only 1
Only 1
2, 3 and 4
2, 3 and 4
Only 3
Only 3
2 and 4
2 and 4
Rabbit eats the grass and the fox eats the rabbit, so the fox is:
1 Mark(s)
Your Answer:
prey
prey
primary producers
primary producers
secondary producers
secondary producers
omnivores
omnivores
How many kinds of parameters are there in C++?
1 Mark(s)
Your Answer:
1
1
2
2
3
3
5
5
Fetching data from the large objects can be performed using method such as:
1 Mark(s)
Your Answer:
getString()
getString()
getBytes()
getBytes()
getSubString()
getSubString()
Both B and C
Both B and C
Input devices includes:
1 Mark(s)
Your Answer:
mouse, keyboard, monitor
mouse, keyboard, monitor
mouse, keyboard, printer
mouse, keyboard, printer
mouse, keyboard, plotter
mouse, keyboard, plotter
mouse, keyboard, scanner
mouse, keyboard, scanner
Which algorithm is used for Clustering?
1 Mark(s)
Your Answer:
Decision Tree
Decision Tree
K-Means
K-Means
Linear Regression
Linear Regression
Naive Bayes
Naive Bayes
Which of the following properties is essential for the efficient implementation of Dijkstra's algorithm?
1 Mark(s)
Your Answer:
An adjacency matrix for fast access.
An adjacency matrix for fast access.
A stack to keep track of visited nodes.
A stack to keep track of visited nodes.
A hash table for node storage.
A hash table for node storage.
A priority queue or min-heap to extract the minimum distance.
A priority queue or min-heap to extract the minimum distance.
In Sqoop, what does the term "Export" refer to?
1 Mark(s)
Your Answer:
Execute MapReduce jobs
Execute MapReduce jobs
Transfer data from a relational database to Hadoop
Transfer data from a relational database to Hadoop
Manage computation resources
Manage computation resources
None of the above
None of the above
In a computer, standard which governs parallel communication is:
1 Mark(s)
Your Answer:
RS-232
RS-232
RS-232a
RS-232a
CAT 5
CAT 5
IEEE 1284
IEEE 1284
Which algorithm is well-suited for string matching when dealing with long and complex patterns?
1 Mark(s)
Your Answer:
Boyer-Moore
Boyer-Moore
Knuth-Morris-Pratt (KMP)
Knuth-Morris-Pratt (KMP)
Rabin-Karp
Rabin-Karp
Naive Search
Naive Search
SQL provides constructs for:
1 Mark(s)
Your Answer:
Updation
Updation
Insertion
Insertion
Deletion
Deletion
All of the Above
All of the Above
A system in which exchange takes place between living and non-living things is known as:
1 Mark(s)
Your Answer:
cycle
cycle
computer system
computer system
ecosystem
ecosystem
none of them
none of them
1.77 is refractive index of:
1 Mark(s)
Your Answer:
Carbon disulfide
Carbon disulfide
Sapphire
Sapphire
Heavy fint glass
Heavy fint glass
Diamond
Diamond
Disk copy command in DOS used to:
1 Mark(s)
Your Answer:
copy a file
copy a file
copy contents of one floppy disk to another
copy contents of one floppy disk to another
copy content of CD-ROM to another
copy content of CD-ROM to another
copy contents hard disk
copy contents hard disk
In Ruby, what does the `case` statement allow you to compare against?
1 Mark(s)
Your Answer:
Integers
Integers
Strings
Strings
Ranges
Ranges
All of the above
All of the above
In order to email a Word document from within MS Word
1 Mark(s)
Your Answer:
Office button > Send to > Mail Recipient
Office button > Send to > Mail Recipient
Save the file as an email attachment
Save the file as an email attachment
Start Outlook and attach the file while open in Word
Start Outlook and attach the file while open in Word
This is an impossible operation
This is an impossible operation
In MS Excel, the $ symbol in a formula denotes ______?
1 Mark(s)
Your Answer:
Named Range
Named Range
Currency Format
Currency Format
Absolute Cell Reference
Absolute Cell Reference
None of these
None of these
In a graph, which of the following is an example of a node?
1 Mark(s)
Your Answer:
Edge
Edge
Vertex
Vertex
Cycle
Cycle
Degree
Degree
The variation in absorption spectrum with polarization direction can be used to investigate the degree of:
1 Mark(s)
Your Answer:
orientation of ions
orientation of ions
orientation of atoms
orientation of atoms
orientation of molecules
orientation of molecules
orientation of compound
orientation of compound
Lambda functions cannot be pickled because:
1 Mark(s)
Your Answer:
Lambda functions only deal with binary values, that is, 0 and 1
Lambda functions only deal with binary values, that is, 0 and 1
Lambda functions cannot be called directly
Lambda functions cannot be called directly
Lambda functions cannot be identified by the functions of the pickle module
Lambda functions cannot be identified by the functions of the pickle module
All lambda functions have the same name, that is,
All lambda functions have the same name, that is,
What does COW stand for in memory management?
1 Mark(s)
Your Answer:
Convert overwrite
Convert overwrite
Copy overwrite
Copy overwrite
Cut overwrite
Cut overwrite
Copy on write
Copy on write
What are the different types of exceptions?
1 Mark(s)
Your Answer:
1
1
2
2
3
3
4
4
Making the push operation costly, select the code snippet which implements the pop operation.
1 Mark(s)
Your Answer:
public void pop() { if(q1.size()>0) { q2.poll(); } else if(q2.size()>0) { q1.poll(); } }
public void pop() { if(q1.size()>0) { q2.poll(); } else if(q2.size()>0) { q1.poll(); } }
public void pop() { if(q1.size()>0) { q1.poll(); } else if(q2.size()>0) { q2.poll(); } }
public void pop() { if(q1.size()>0) { q1.poll(); } else if(q2.size()>0) { q2.poll(); } }
public void pop() { q1.poll(); q2.poll(); }
public void pop() { q1.poll(); q2.poll(); }
public void pop() { if(q2.size()>0) { q1.poll(); } else { q2.poll(); } }
public void pop() { if(q2.size()>0) { q1.poll(); } else { q2.poll(); } }
Which of these method can be used to increase the capacity of ArrayList object manually?
1 Mark(s)
Your Answer:
Capacity()
Capacity()
increaseCapacity()
increaseCapacity()
increasecapacity()
increasecapacity()
ensureCapacity()
ensureCapacity()
How many types of data structures does R language have?
1 Mark(s)
Your Answer:
2
2
3
3
5
5
8
8
In R, what does the plot() function do when applied to a linear regression model?
1 Mark(s)
Your Answer:
Plots the residuals against the fitted values
Plots the residuals against the fitted values
Creates a scatter plot of the model predictions
Creates a scatter plot of the model predictions
Plots the model coefficients
Plots the model coefficients
Generates a summary plot for the model
Generates a summary plot for the model
Crtl +Z is used for?
1 Mark(s)
Your Answer:
print
print
save
save
undo
undo
none
none
What is the purpose of the "if-else" statement in Java?
1 Mark(s)
Your Answer:
To execute one block of code if a condition is true and another block if it's false
To execute one block of code if a condition is true and another block if it's false
To declare variables
To declare variables
To create loops
To create loops
To define methods
To define methods
What is the code snippet to change the class and let the stylesheet specify the details?
1 Mark(s)
Your Answer:
timestamp.className = "highlight";
timestamp.className = "highlight";
timestamp.className = "change";
timestamp.className = "change";
timestamp.className = "specify";
timestamp.className = "specify";
timestamp.className = "move";
timestamp.className = "move";
What is needed to determine the number of the last byte of a fragment in IPv4?
1 Mark(s)
Your Answer:
Identification number
Identification number
Offset number
Offset number
Total length
Total length
(B) and (C)
(B) and (C)
In MS Excel, You can copy data or formulas _____?
1 Mark(s)
Your Answer:
With buttons on the standard toolbars
With buttons on the standard toolbars
With commands on the shortcut menu
With commands on the shortcut menu
With the copy, paste and cut commands on the edit menu
With the copy, paste and cut commands on the edit menu
All of the above
All of the above
How do you find the number of minutes between two DateTime objects in Ruby?
1 Mark(s)
Your Answer:
Subtract one DateTime object from another and divide the result by 60 to convert to minutes
Subtract one DateTime object from another and divide the result by 60 to convert to minutes
Use the minutes_between method
Use the minutes_between method
Use the difference method with the minutes option
Use the difference method with the minutes option
Use the delta method with the minutes option
Use the delta method with the minutes option
Which mode allows us to run program interactively while watching source code and variables during execution?
1 Mark(s)
Your Answer:
safe mode
safe mode
debug mode
debug mode
successfully run mode
successfully run mode
exception mode
exception mode
What is the time complexity of exponential search when the input array is sorted but the values are not uniformly distributed?
1 Mark(s)
Your Answer:
O(n1/2)
O(n1/2)
O(log log n)
O(log log n)
O(n)
O(n)
O(log n)
O(log n)
The ....... contains commands associated with the My Computer window
1 Mark(s)
Your Answer:
Standard menu
Standard menu
Start menu
Start menu
System menu
System menu
None of the above
None of the above
What is the primary benefit of autoboxing in Java?
1 Mark(s)
Your Answer:
It improves memory management
It improves memory management
It reduces code complexity
It reduces code complexity
It simplifies code by automatically converting between primitive types and their corresponding wrapper classes
It simplifies code by automatically converting between primitive types and their corresponding wrapper classes
It speeds up code execution
It speeds up code execution
What is the maximum efficiency of slotted aloha at G = 1?
1 Mark(s)
Your Answer:
36.8
36.8
35.8
35.8
35.5
35.5
37.8
37.8
Integral curves for a differential equation that governs a system are referred to as:
1 Mark(s)
Your Answer:
streamlines
streamlines
electrical lines
electrical lines
trajectories
trajectories
field lines
field lines
How many non-overlapping channels are available with 802.11a?
1 Mark(s)
Your Answer:
3
3
12
12
23
23
40
40
Which one of the following is more efficient in terms of the file size reduction?
1 Mark(s)
Your Answer:
YUI
YUI
Closure Compiler (advanced)
Closure Compiler (advanced)
Minify
Minify
Closure Compiler (simple)
Closure Compiler (simple)
When methane is combusted with oxygen, the products produced are:
1 Mark(s)
Your Answer:
nitrogen & oxygen
nitrogen & oxygen
carbon dioxide & water
carbon dioxide & water
oxygen & water
oxygen & water
many gases
many gases
Which file is used to define dependency in maven?
1 Mark(s)
Your Answer:
build.xml
build.xml
pom.xml
pom.xml
dependency.xml
dependency.xml
version.xml
version.xml
The fall in the rate of photosynthesis takes place when the temperature rises above:
1 Mark(s)
Your Answer:
40 °C
40 °C
30 °C
30 °C
20 °C
20 °C
25 °C
25 °C
NRZ-L and NRZ-J both have a problem of:
1 Mark(s)
Your Answer:
conversion
conversion
phase shift
phase shift
doesn't changes at all
doesn't changes at all
DC component
DC component
This database has only one table.
1 Mark(s)
Your Answer:
relational
relational
large
large
flat-file
flat-file
DBMS
DBMS
Which one of the following keyword is used to find out the number of values in a column?
1 Mark(s)
Your Answer:
TOTAL
TOTAL
COUNT
COUNT
SUM
SUM
ADD
ADD
The 3R principle is in which of the following order:
1 Mark(s)
Your Answer:
Reduce, Reuse, Recycle
Reduce, Reuse, Recycle
Reuse, Reduce, Recycle
Reuse, Reduce, Recycle
Recycle, Reuse, Reduce,
Recycle, Reuse, Reduce,
None of the above
None of the above
What keyword is used to release memory in C++?
1 Mark(s)
Your Answer:
free
free
delete
delete
remove
remove
clear
clear
What is the output of the following code: import re result = re.findall(r'bw+b', 'Hello, world!') print(result)
1 Mark(s)
Your Answer:
['Hello', 'world']
['Hello', 'world']
An error will occur
An error will occur
['Hello,', 'world!']
['Hello,', 'world!']
['H', 'w']
['H', 'w']
What does MAC stand for?
1 Mark(s)
Your Answer:
Media Access Control
Media Access Control
Master Access Code
Master Access Code
Main Address Code
Main Address Code
Media Area Connect
Media Area Connect
An object can have which of the following multiplicities?
1 Mark(s)
Your Answer:
Zero
Zero
One
One
More than one
More than one
All of the above
All of the above
In Ruby, what does the extend keyword do?
1 Mark(s)
Your Answer:
Adds methods from a module as class methods
Adds methods from a module as class methods
Adds methods from a module as instance methods
Adds methods from a module as instance methods
Initializes a new instance
Initializes a new instance
Calls a superclass method
Calls a superclass method
Previous
Mark For Review & Next
Next
Clear Answer
Finish
© Copyright © 2020 ALGOPK . All Rights Reserved.