- Home
- MCQs by exam
- NTS
NTS MCQs · Page 88
5,604 multiple choice questions typical of the NTS exam, with answers and explanations. Switch on practice mode to test yourself first.
-
A
qcut, which uses sample quantiles, whereas cut splits on equal-width value ranges
Correct answer
-
B
cut, which uses sample quantiles, whereas qcut splits on equal-width value ranges
-
C
cut, because both functions are identical except for the naming of their labels
-
D
qcut, because it always produces equal-width bins regardless of the data distribution
-
A
A boolean Series aligned to the index, with NaN rows marked False unless NaN is listed
Correct answer
-
B
A boolean Series of identical length, with NaN rows marked True so every record is kept
-
C
An integer array of row positions, because isin returns the matching row numbers
-
D
A filtered DataFrame directly, since isin applies the mask as soon as it is called
-
A
df.transpose, which swaps rows and columns and therefore creates a long form table
-
B
df.melt with id_vars, which turns the monthly columns into rows of key-value pairs
Correct answer
-
C
df.pivot with the month columns as index, which expands the columns into extra rows
-
D
df.stack on axis=1, which returns a wide frame with the months kept as columns
-
A
Scattered in place, because pandas leaves NaN rows where they originally stood
-
B
The call raises, because sorting a column with NaN requires dropna first
-
C
At the end by default, because na_position defaults to last in sort_values
Correct answer
-
D
At the beginning by default, because NaN sorts before every numeric value
-
A
The duplicate cells are averaged, because the default aggregation is the mean
Correct answer
-
B
A ValueError is raised, because duplicate entries need an explicit aggfunc
-
C
The last row for each cell wins, because pivot_table keeps the final value
-
D
The rows are concatenated into a list inside the cell, preserving every value
-
A
Egress dominates, because data transferred out to the internet is billed and inbound is free
Correct answer
-
B
Ingress dominates, because inbound data is billed per gigabyte while outbound egress is free of charge
-
C
They cost the same, because both directions are billed at the identical per-gigabyte rate today
-
D
Neither is billed, because traffic remains free while it stays within a single AWS region
-
A
The bucket's versioning window, because the replica retains every prior object version written
-
B
Near-zero but not zero, because replication is asynchronous and may lag by seconds or minutes
Correct answer
-
C
Exactly zero, because replication is synchronous and commits the object to both regions together
-
D
Zero for new objects only, since existing objects are copied synchronously when it is enabled
-
A
10, because DynamoDB charges one write unit per item regardless of the individual item size
-
B
30, because each item rounds up to three units and the remaining size is ignored here
-
C
120, because writes are billed twice over when the table uses eventual consistency
-
D
60, because each 6 KB item consumes six write units and ten are written per second
Correct answer
-
A
254, because only the network and broadcast addresses are unusable inside a subnet here
-
B
250, because AWS reserves six addresses once the VPC router is also counted
-
C
251, because AWS reserves five addresses in every subnet for networking functions
Correct answer
-
D
256, because a /24 mask leaves eight host bits with no addresses reserved
-
A
It replaces the customer master key for all requests, sharply reducing KMS API call volume
-
B
It is a plaintext credential that must be rotated manually with every object written
-
C
It encrypts the data locally, and is itself stored encrypted under a KMS customer key
Correct answer
-
D
It encrypts the customer master key, so the master key never leaves the KMS service
-
A
Issue an invalidation for /* first, then upload the fixed file to the same key
-
B
Set the origin's Cache-Control max-age to zero, which flushes all existing edge copies at once
-
C
Reduce the default TTL to 60 seconds, which bounds how long an edge copy is stale
-
D
Version the object key, such as app-v2.js, so the CDN path itself is new and uncached
Correct answer
-
A
It raises the function's default timeout to match the reserved concurrency value in seconds
-
B
It provisions dedicated EC2 capacity that is billed whether or not it is invoked
-
C
It carves out and caps concurrency for that function, throttling it beyond the limit
Correct answer
-
D
It guarantees the function never cold-starts, by keeping the reserved pool warm
-
A
The message stays invisible until the queue's retention period eventually expires
-
B
The message becomes visible again and another consumer may process it a second time
Correct answer
-
C
The message is permanently deleted, because the expired timeout counts as an acknowledgement
-
D
The message moves to the dead-letter queue immediately, since the receive has failed
-
A
Instant, which is the only tier available to Glacier Flexible Retrieval archive objects
-
B
Expedited, which typically returns data in 1-5 minutes and is the most expensive tier
Correct answer
-
C
Bulk, which returns data within 5-12 hours and is the cheapest of the available tiers
-
D
Standard, which returns data in 3-5 hours and costs the same as expedited retrieval
-
A
Both are synchronous copies, but only the standby can serve read queries under load
-
B
Both are asynchronous copies, and either can be promoted to primary without any data loss at all
-
C
The standby is synchronous and not readable, while a replica is asynchronous and queryable
Correct answer
-
D
The standby is asynchronous and readable, while a replica is synchronous and write-only
-
A
16000 IOPS and 1000 MiB/s, the maximum that any gp3 volume can ever reach
-
B
3000 IOPS and 125 MiB/s, with extra IOPS and throughput purchased separately
Correct answer
-
C
3000 IOPS and 250 MiB/s, with throughput scaling automatically with volume size
-
D
100 IOPS per GiB and 250 MiB/s, both scaling in proportion to the volume's size
-
A
RDS, whose database instances run in a single availability zone or region pair
-
B
IAM, whose users, roles and policies apply across every region in the account
Correct answer
-
C
EC2, whose instances are created inside a chosen availability zone in one region
-
D
S3, whose buckets are served from the region chosen when they are created
-
A
Instance store is ephemeral local disk tied to the host, while EBS persists independently
Correct answer
-
B
Instance store survives a stopped instance, while EBS volumes are deleted with the host
-
C
Both are network-attached, but instance store offers higher durability by replicating twice
-
D
Instance store is billed per gigabyte-month, while EBS is included in the instance price
-
A
New instances from receiving traffic until their health checks have passed twice in a row
-
B
Scale-in events entirely, so the group can only ever grow during a traffic spike
-
C
The load balancer from deregistering instances that are still serving requests
-
D
Further scaling actions until metrics stabilise, avoiding repeated over-correction
Correct answer
-
A
The role issues an encrypted access key that is written to the instance's root volume at boot
-
B
The role removes the need for any permission policy at all, since the instance identity is trusted by default
-
C
The role lets the instance share one access key with other accounts without extra configuration
-
D
The role issues short-lived credentials through instance metadata, so no long-term secret is stored
Correct answer
-
A
Both exceptions are merged into a std::nested_exception and rethrown together
-
B
The program continues normally, with the destructor's exception silently discarded
-
C
std::terminate is called, because two active exceptions cannot propagate at once
Correct answer
-
D
The new exception replaces the old one and unwinding continues from that point
-
A
The value m.begin(), because erasing resets all stored iterators
-
B
The iterator to the following element, which erase returned by value
Correct answer
-
C
An invalidated iterator, so incrementing it afterwards is undefined behaviour
-
D
The iterator to the erased element, which remains allocated but detached
-
A
Direct-initialisation, so objects can only be created through a factory function
-
B
Copy construction, so the type can no longer be stored inside standard containers
-
C
Aggregate initialisation, since the class is no longer an aggregate after the change
-
D
Implicit conversion from the argument type at call sites and in copy-initialisation
Correct answer
-
A
It reads a valid value, because std::function extends the lifetime of captures
-
B
It reads a dangling reference, because the local died with its stack frame
Correct answer
-
C
It reads the value the local held, because capture by reference copies on escape
-
D
It throws std::bad_function_call, since the captured reference has expired
-
A
Function templates are chosen by overload resolution, so partial ordering fills that role
Correct answer
-
B
Partial specialisation of function templates was removed by the C++11 standard revision
-
C
A function template needs a class template wrapper before it can be specialised at all
-
D
Partial specialisation is allowed, but only when every template parameter is a reference type