- Home
- MCQs by exam
- NTS
NTS MCQs · Page 211
5,604 multiple choice questions typical of the NTS exam, with answers and explanations. Switch on practice mode to test yourself first.
-
A
MySQL
-
B
MongoDB
-
C
SQLite
Correct answer
-
D
PostgreSQL
-
A
post_migrate
-
B
post_save
Correct answer
-
C
pre_delete
-
D
request_started
-
A
It silently returns None instead
-
B
It raises MultipleObjectsReturned
Correct answer
-
C
It returns a list of all the rows
-
D
It returns the first matching row
-
A
Raises Http404 (Not Found)
Correct answer
-
B
Returns the first product instead
-
C
Returns None without any error
-
D
Creates a new product with pk 5
-
A
INSTALLED_APPS
-
B
STATIC_ROOT
-
C
ALLOWED_HOSTS
Correct answer
-
D
SECRET_KEY
-
A
When the Django server first starts
-
B
Only when the migrate command runs
-
C
When it is evaluated, for example iterated
Correct answer
-
D
As soon as the filter line is written
-
A
Runs it after parsing, in order
Correct answer
-
B
Runs it only when the user scrolls
-
C
Prevents the script from ever running
-
D
Runs it immediately and blocks parsing
-
A
<legend>
-
B
<caption>
-
C
<figcaption>
Correct answer
-
D
<summary>
-
A
To offer image files for different screen sizes
Correct answer
-
B
To load several images as a slideshow
-
C
To set the image's colour profile
-
D
To list backup URLs if the server is down
-
A
Prevents the image from being cached
-
B
Loads the image at a lower resolution
-
C
Loads the image only after a user clicks it
-
D
Delays loading until the image nears the viewport
Correct answer
-
A
cols="3"
-
B
colspan="3"
Correct answer
-
C
span="3"
-
D
rowspan="3"
-
A
Hides the page from search engine results
-
B
Sets the page title shown in the browser tab
-
C
Makes the page scale correctly on mobile screens
Correct answer
-
D
Prevents users from zooming on any device
-
A
notnull
-
B
mandatory
-
C
validate
-
D
required
Correct answer
-
A
Encryption of the typed address
-
B
Automatic sending of an email
-
C
A list of the user's contacts
-
D
Built-in email format validation
Correct answer
-
A
<label id="email">
-
B
<label for="email">
Correct answer
-
C
<label href="email">
-
D
<label name="email">
-
A
To block access to window.opener
Correct answer
-
B
To prevent search engines following it
-
C
To speed up loading of the linked page
-
D
To make the link open in the same tab
-
A
It links the page to a JavaScript file
-
B
It loads the default CSS stylesheet
-
C
It enables HTML5 standards mode
Correct answer
-
D
It creates the page's main heading
-
A
To set the width and height of the image
-
B
To add a border around the image
-
C
To describe the image for screen readers
Correct answer
-
D
To link the image to another web page
-
A
str_contains()
Correct answer
-
B
str_has()
-
C
in_string()
-
D
contains()
-
A
urlencode_html()
-
B
htmlspecialchars()
Correct answer
-
C
mysqli_escape()
-
D
strip_tags_all()
-
A
1
-
B
0
-
C
false
-
D
-1
Correct answer
-
A
It works only with integer conditions
-
B
It needs a break after every case arm
-
C
It uses strict comparison and returns a value
Correct answer
-
D
It uses loose comparison and falls through
-
A
Throws an error when the key is missing
-
B
Compares the two values for equality
-
C
Always overwrites the value with 'Guest'
-
D
Uses 'Guest' if the key is missing or null
Correct answer
-
A
[1, 2, 3, 2]
-
B
[2, 2, 2]
-
C
12
-
D
[2, 4, 6]
Correct answer
-
A
md5()
-
B
base64_encode()
-
C
password_hash()
Correct answer
-
D
sha1()