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
:
04
:
00
Q:
1
/
71
🤖
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.
Python Programming Mock Test 20
Exam Duration:
01:04:00
Python Programming Mock Test 20
: Question
1
of 71
What will be the output of the following C code if the value of 'p' is 10 and that of 'q' is 15? #include<stdio.h> int main() { int p,q; printf("Enter two numbers\n"); scanf("%d",&p); scanf("%d",&q); #if(4-1) printf("%d",q); #else printf("bye"); #endif }
1 Mark(s)
Your Answer:
10
10
15
15
bye
bye
error
error
A part of a computer system that consists of data or computer instructions is called:
1 Mark(s)
Your Answer:
software
software
chip
chip
hardware
hardware
DOS
DOS
What will be the output of the following PHP code ? <?php function calc($num1, $num2) { $total = $num1 * $num2; return $total; } $result = calc(42, 0); echo $result; ?>
1 Mark(s)
Your Answer:
Error
Error
0
0
42
42
84
84
What does the len() function do when applied to a list or tuple?
1 Mark(s)
Your Answer:
Returns the length of the list or tuple
Returns the length of the list or tuple
Converts the list or tuple to lowercase
Converts the list or tuple to lowercase
Converts the list or tuple to uppercase
Converts the list or tuple to uppercase
Removes the last element
Removes the last element
For each attribute, the JDBC retrieve its:
1 Mark(s)
Your Answer:
Name
Name
Address
Address
Data type
Data type
Both A and C
Both A and C
When does a cycle occur during memory leak?
1 Mark(s)
Your Answer:
No reference occurs
No reference occurs
Two objects reference
Two objects reference
One object gets referenced
One object gets referenced
None of the above
None of the above
The difference between memory and storages is that memory is ________________ and storage is ____________________?
1 Mark(s)
Your Answer:
Permanent, temporary
Permanent, temporary
Temporary, permanent
Temporary, permanent
Slow, fast
Slow, fast
Fast, slow
Fast, slow
Choose the correct statement in context of the following program code. public class Test{ public static void main(String[] args){ double sum = 0; for(double d = 0; d
1 Mark(s)
Your Answer:
The program has a compile error because the adjustment is missing in the for loop.
The program has a compile error because the adjustment is missing in the for loop.
The program has a compile error because the control variable in the for loop cannot be of the double type.
The program has a compile error because the control variable in the for loop cannot be of the double type.
The program runs in an infinite loop because d<10 would always be true.
The program runs in an infinite loop because d<10 would always be true.
The program compiles and runs fine.
The program compiles and runs fine.
How can you handle CAPTCHAs in web scraping?
1 Mark(s)
Your Answer:
By solving CAPTCHAs manually
By solving CAPTCHAs manually
By ignoring CAPTCHAs
By ignoring CAPTCHAs
By using APIs to bypass CAPTCHAs
By using APIs to bypass CAPTCHAs
By using CAPTCHA-solving services
By using CAPTCHA-solving services
The characteristic of system that it must deliver data in a timely manner is called:
1 Mark(s)
Your Answer:
Accuracy
Accuracy
Timeliness
Timeliness
Jitter
Jitter
Delivery
Delivery
Which function is used to retrieve the description of the exception in C++?
1 Mark(s)
Your Answer:
get_message()
get_message()
what()
what()
catch_msg()
catch_msg()
exception_desc()
exception_desc()
The main constituent of the air is:
1 Mark(s)
Your Answer:
A) nitrogen
A) nitrogen
B) oxygen
B) oxygen
C) carbon dioxide
C) carbon dioxide
D) hydrogen.
D) hydrogen.
When mapping a multivalued attribute into a relation which of the following is true?
1 Mark(s)
Your Answer:
One relation is created.
One relation is created.
Two relations are created.
Two relations are created.
Three relations are created.
Three relations are created.
Four relations are created.
Four relations are created.
In a regular expression, what does the metacharacter `d` represent?
1 Mark(s)
Your Answer:
Any special character
Any special character
Any digit
Any digit
Any whitespace character
Any whitespace character
None of These
None of These
Which image file format is not supported in Firefox?
1 Mark(s)
Your Answer:
ICO
ICO
PNG
PNG
SVG
SVG
APNG
APNG
To reserve your last action or command, what feature would you use?
1 Mark(s)
Your Answer:
boot
boot
cut
cut
undo
undo
drag
drag
How can you prevent multiple threads from accessing a critical section of code simultaneously in Java?
1 Mark(s)
Your Answer:
By using the wait() method
By using the wait() method
By using the start() method multiple times
By using the start() method multiple times
By creating more threads to access the critical section
By creating more threads to access the critical section
By using synchronized blocks or methods
By using synchronized blocks or methods
In C#, what is the method called on an exception object to retrieve information about the error that occurred?
1 Mark(s)
Your Answer:
GetMessage()
GetMessage()
ToString()
ToString()
GetError()
GetError()
GetStackTrace()
GetStackTrace()
Prepared statements are created in which some values are replaced by:
1 Mark(s)
Your Answer:
?
?
@
@
#
#
%
%
How many reserved words are there in JavaScript?
1 Mark(s)
Your Answer:
63
63
54
54
68
68
90
90
Too much acid in the stomach can cause:
1 Mark(s)
Your Answer:
infection
infection
burning
burning
fever
fever
ulcer
ulcer
Consider the following pseudocode of insertion in XOR list and write the approximate code snippet of it. void xor-linked-list insert(struct node **head_ref, int value) { node *new_node = new (struct node); new_node->value = value; new_node->nodepointerxored = xor (*head_ref, NULL); if (*head_pointer == NULL) { printf("invalid"); } else { let b,c,d are nodes and a is to be inserted at beginning, a address field must contain NULL xor b and b address filed must be a xor c. } *head_pointer = new_node; }
1 Mark(s)
Your Answer:
node* next = XOR ((*head_ref)->npx, NULL); (*head_ref)->npx = XOR (new_node, next);
node* next = XOR ((*head_ref)->npx, NULL); (*head_ref)->npx = XOR (new_node, next);
node* next = XOR ((*head_ref)->npx, NULL); (*head_ref) = XOR (new_node, next);
node* next = XOR ((*head_ref)->npx, NULL); (*head_ref) = XOR (new_node, next);
node* next = XOR ((*head_ref)->npx, NULL); (*head_ref)->npx->npx = XOR (new_node, next);
node* next = XOR ((*head_ref)->npx, NULL); (*head_ref)->npx->npx = XOR (new_node, next);
node* next = XOR ((*head_ref), NULL); (*head_ref)->npx = XOR (new_node, next);
node* next = XOR ((*head_ref), NULL); (*head_ref)->npx = XOR (new_node, next);
What will be the output of the following Java program if input given is "abc'def/'egh"? class Input_Output { public static void main(String args[]) throws IOException { char c; BufferedReader obj = new BufferedReader(new InputStreamReader(System.in)); do { c = (char) obj.read(); System.out.print(c); } while(c!='\''); } }
1 Mark(s)
Your Answer:
abc'
abc'
abcdef/'
abcdef/'
abc'def/'egh
abc'def/'egh
abcqfghq
abcqfghq
An operating system version designed for use with a tablet PC is Microsoft Windows XP
1 Mark(s)
Your Answer:
Home edition
Home edition
Media center edition
Media center edition
Tablet PC edition
Tablet PC edition
None of the above
None of the above
What does the `protected` keyword do in Ruby?
1 Mark(s)
Your Answer:
Makes methods accessible from outside the class
Makes methods accessible from outside the class
Restricts access to methods below it
Restricts access to methods below it
Makes methods accessible from anywhere in the code
Makes methods accessible from anywhere in the code
None of the above
None of the above
What will be the output of the following Java program? import java.text.*; import java.util.*; class Date_formatting { public static void main(String args[]) { Date date = new Date(); SimpleDateFormat sdf; sdf = new SimpleDateFormat("hh:mm:ss"); System.out.print(sdf.format(date)); } } Note : The program is executed at 3 hour 55 minutes and 4 sec (24 hours time).
1 Mark(s)
Your Answer:
3:55:4
3:55:4
3.55.4
3.55.4
55:03:04
55:03:04
03:55:04
03:55:04
Which Java class provides methods for fixed-size arrays with automatic resizing?
1 Mark(s)
Your Answer:
HashSet
HashSet
Vector
Vector
ArrayList
ArrayList
LinkedList
LinkedList
Collecting personal information and effectively posing as another individual is known as the crime of_____________?
1 Mark(s)
Your Answer:
Spooling.
Spooling.
Identity theft.
Identity theft.
Spoofing.
Spoofing.
Hacking.
Hacking.
What programming language(s) or scripting language(s) does Java Server Pages (JSP) support?
1 Mark(s)
Your Answer:
VBScript only
VBScript only
Jscript only
Jscript only
Java only
Java only
All of the above are supported
All of the above are supported
Newspaper, magazine, radio, television are example of _________?
1 Mark(s)
Your Answer:
Storing information
Storing information
Retrieving information
Retrieving information
Communication information
Communication information
Acquiring information
Acquiring information
All of the following are phases of systems analysis, except ?
1 Mark(s)
Your Answer:
decision analysis phase
decision analysis phase
requirements analysis phase
requirements analysis phase
design analysis phase
design analysis phase
problem analysis phase
problem analysis phase
How to declare the complex number?
1 Mark(s)
Your Answer:
(3, 4)
(3, 4)
complex(3, 4)
complex(3, 4)
(3, 4i)
(3, 4i)
(3, 4g)
(3, 4g)
A data object can encapsulates processes and operation as well _________________?
1 Mark(s)
Your Answer:
True
True
False
False
What will be the output of the following PHP code ? <?php $x = 5; { echo "$x"; } ?>
1 Mark(s)
Your Answer:
0
0
5
5
Nothing
Nothing
Error
Error
Amount by which measured time interval is greater then corresponding proper time interval is called:
1 Mark(s)
Your Answer:
Time dilation
Time dilation
Time parameter
Time parameter
Time interval
Time interval
Time limitation
Time limitation
In unicast routing, the size of the network in the distance vector routing can not exceed:
1 Mark(s)
Your Answer:
2 hops
2 hops
5 hops
5 hops
10 hops
10 hops
15 hops
15 hops
The Internet Control Message Protocol (ICMP) is the companion of:
1 Mark(s)
Your Answer:
IP Transmission
IP Transmission
IP Packet
IP Packet
IP Frame
IP Frame
IP protocol
IP protocol
Institute of Electrical and Electronics Engineers (IEEE) 802.11 Direct Sequence Spread Spectrum (DSSS) uses the data rate of:
1 Mark(s)
Your Answer:
1 or 2 Mbps
1 or 2 Mbps
6 to 54 Mbps
6 to 54 Mbps
5.5 and 11 Mbps
5.5 and 11 Mbps
2 and 54 Mbps
2 and 54 Mbps
Which of the following may create problem in the typedef program?
1 Mark(s)
Your Answer:
;
;
printf/scanf
printf/scanf
Arithmetic operators
Arithmetic operators
All of the mentioned
All of the mentioned
IBM 1401 is_________?
1 Mark(s)
Your Answer:
First Generation Computer
First Generation Computer
Second Generation Computer
Second Generation Computer
Third Generation Computer
Third Generation Computer
Fourth Generation Computer
Fourth Generation Computer
Where is the R.java file located?
1 Mark(s)
Your Answer:
src
src
gen
gen
Both A and B
Both A and B
None of these
None of these
In C++, 'b' escape sequence is used for:
1 Mark(s)
Your Answer:
Bold
Bold
Backspace
Backspace
Format
Format
New Line
New Line
Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:
1 Mark(s)
Your Answer:
[0, 1, 2, 3]
[0, 1, 2, 3]
[0, 1, 2, 3, 4]
[0, 1, 2, 3, 4]
[0.0, 0.5, 1.0, 1.5]
[0.0, 0.5, 1.0, 1.5]
[0.0, 0.5, 1.0, 1.5, 2.0]
[0.0, 0.5, 1.0, 1.5, 2.0]
What does a switch do when a frame is received on an interface and the destination hardware address is unknown or not in the filter table?
1 Mark(s)
Your Answer:
Forwards the switch to the first available link
Forwards the switch to the first available link
Drops the frame
Drops the frame
Floods the network with the frame looking for the device
Floods the network with the frame looking for the device
Sends back a message to the originating station asking for a name resolution
Sends back a message to the originating station asking for a name resolution
All animals need oxygen and most of this oxygen comes from:
1 Mark(s)
Your Answer:
roots
roots
plants
plants
stem
stem
pollen grain
pollen grain
In SQL, the grant statement is used to confer:
1 Mark(s)
Your Answer:
Integrity constraint
Integrity constraint
Assertion
Assertion
Authorization
Authorization
Uniqueness
Uniqueness
In Java web applications, what is the purpose of the `@SessionScoped` annotation?
1 Mark(s)
Your Answer:
To define JavaBean properties
To define JavaBean properties
To execute SQL queries
To execute SQL queries
To indicate that a bean's scope is limited to a user session
To indicate that a bean's scope is limited to a user session
To create JavaBeans
To create JavaBeans
A compiler can detect which type of error?
1 Mark(s)
Your Answer:
Logical error
Logical error
Runtime error
Runtime error
Syntax error
Syntax error
All of these
All of these
In Hive, what does the term "Bucketing" refer to?
1 Mark(s)
Your Answer:
Grouping data based on a condition
Grouping data based on a condition
Organizing data into fixed-sized buckets
Organizing data into fixed-sized buckets
Joining data from multiple tables
Joining data from multiple tables
None of the above
None of the above
Which of these is an incorrect string literal?
1 Mark(s)
Your Answer:
"Hello World"
"Hello World"
"Hello\nWorld"
"Hello\nWorld"
"\"Hello World\""
"\"Hello World\""
"Hello world"
"Hello world"
What is the use of "w" in file handling?
1 Mark(s)
Your Answer:
Read
Read
Write
Write
Append
Append
None of the mentioned
None of the mentioned
A spline can be defined as -
1 Mark(s)
Your Answer:
Curved strip
Curved strip
A smooth curve is drawn using a pencil.
A smooth curve is drawn using a pencil.
A flexible strip used to generate a smooth curve through a designated set of points.
A flexible strip used to generate a smooth curve through a designated set of points.
None of the above
None of the above
Which is more widely used than GWT in Google?
1 Mark(s)
Your Answer:
Closure
Closure
Dojo
Dojo
Procedure
Procedure
jQuery
jQuery
WAN stands for:
1 Mark(s)
Your Answer:
Wireless Area Network
Wireless Area Network
Wide Area Network
Wide Area Network
World Area Network
World Area Network
Web Area Network
Web Area Network
Neutrons carry:
1 Mark(s)
Your Answer:
positive charge
positive charge
negative charge
negative charge
neutral charge
neutral charge
no charge
no charge
Medicines are used to:
1 Mark(s)
Your Answer:
prevent diseases
prevent diseases
treat diseases
treat diseases
both a and b
both a and b
kill people
kill people
What does the 'calloc' function in C do?
1 Mark(s)
Your Answer:
Allocates and initializes memory to zero
Allocates and initializes memory to zero
Allocates memory and leaves it uninitialized
Allocates memory and leaves it uninitialized
Deallocates memory
Deallocates memory
Checks for memory leaks
Checks for memory leaks
What is the purpose of the 'printf' function in C?
1 Mark(s)
Your Answer:
To print formatted text to the standard output
To print formatted text to the standard output
To read text from the standard input
To read text from the standard input
To open a file
To open a file
To close a file
To close a file
__________is defined as any crime completed through the use of computer technology?
1 Mark(s)
Your Answer:
Computer forensics
Computer forensics
Computer crime
Computer crime
Hacking
Hacking
Cracking
Cracking
BIOS stand for:?
1 Mark(s)
Your Answer:
Basic Input/Output System
Basic Input/Output System
Binary Input/Output System
Binary Input/Output System
Basic Input/Output Solution
Basic Input/Output Solution
Binary Input/Output Solution Answer
Binary Input/Output Solution Answer
In multiple Point-to-Point Protocol (PPP), the value of the protocol field is:
1 Mark(s)
Your Answer:
Ox003b
Ox003b
Ox003c
Ox003c
Ox003d
Ox003d
Ox003f
Ox003f
What will be the output of the following PHP code ? <?php define("GREETING", "PHP is a scripting language"); echo $GREETING; ?>
1 Mark(s)
Your Answer:
$GREETING
$GREETING
no output
no output
PHP is a scripting language
PHP is a scripting language
GREETING
GREETING
An online journal where people post about their experiences called __________?
1 Mark(s)
Your Answer:
Blog
Blog
Internet
Internet
Webpage
Webpage
None of these
None of these
Which of the following is not included in document management system?
1 Mark(s)
Your Answer:
word processing
word processing
desktop publishing
desktop publishing
reprographic
reprographic
e-shopping
e-shopping
Which of the following property is used to set order in a table?
1 Mark(s)
Your Answer:
border
border
padding
padding
dotted
dotted
text
text
For a browser to connect to other resources , the location or address of the resources must be specified. These addresses are called___________________?
1 Mark(s)
Your Answer:
Identities
Identities
URL
URL
MSN
MSN
Packets
Packets
Which element shows completion progress of a task?
1 Mark(s)
Your Answer:
<progress>
<progress>
<select>
<select>
<option>
<option>
<meter>
<meter>
Which of the following is true concerning an ODBMS?
1 Mark(s)
Your Answer:
They have the ability to store complex data types on the Web.
They have the ability to store complex data types on the Web.
They are overtaking RDBMS for all applications.
They are overtaking RDBMS for all applications.
They are most useful for traditional, two-dimensional database table applications.
They are most useful for traditional, two-dimensional database table applications.
All of the above.
All of the above.
Which of the following is just opposite to the Open Design principle?
1 Mark(s)
Your Answer:
Security through obscurity
Security through obscurity
Least common mechanism
Least common mechanism
Least privileges
Least privileges
Work factor
Work factor
It is necessary that always if should come with else block?
1 Mark(s)
Your Answer:
True
True
False
False
What is the full form of GPU_______?
1 Mark(s)
Your Answer:
Grouped Processing Unit
Grouped Processing Unit
Graphics Processing Unit
Graphics Processing Unit
Graphical Performance Utility
Graphical Performance Utility
Graphical Portable Unit
Graphical Portable Unit
All of these
All of these
Previous
Mark For Review & Next
Next
Clear Answer
Finish
© Copyright © 2020 ALGOPK . All Rights Reserved.