- Home
- MCQs by exam
- NTS
NTS MCQs · Page 161
5,604 multiple choice questions typical of the NTS exam, with answers and explanations. Switch on practice mode to test yourself first.
-
A
A pointer to a function taking an int
Correct answer
-
B
A function that returns an int pointer
-
C
An array of pointers to functions
-
D
A pointer to an array of int values
-
A
4
-
B
8
-
C
1
Correct answer
-
D
2
-
A
calloc leaves the block uninitialised
-
B
calloc zero-fills the allocated block
Correct answer
-
C
calloc places the block on the stack
-
D
calloc resizes an existing block
-
A
It stays valid until the enclosing block ends
-
B
It is aligned for any type with a fundamental alignment
Correct answer
-
C
It points into the current function's stack frame
-
D
It is zero-filled before it is handed back
-
A
13
-
B
10
-
C
11
Correct answer
-
D
25
-
A
-3
Correct answer
-
B
-4
-
C
-3.5
-
D
3
-
A
A compile-time error is reported
-
B
The literal is copied before writing
-
C
The write is silently discarded
-
D
The behaviour is undefined
Correct answer
-
A
4
-
B
7
-
C
5
Correct answer
-
D
6
-
A
It leaves the innermost enclosing loop
Correct answer
-
B
It skips only the current iteration
-
C
It terminates the whole program at once
-
D
It restarts the loop from the beginning
-
A
%lf
Correct answer
-
B
%f
-
C
%d
-
D
%.2f
-
A
Null
-
B
True
-
C
Zero
Correct answer
-
D
False
-
A
10
Correct answer
-
B
5
-
C
15
-
D
20
-
A
The compiler promotes the variable to global
-
B
The program stops with a runtime error
-
C
Using that pointer is undefined behaviour
Correct answer
-
D
The value is moved to the heap automatically
-
A
It is stored in the caller's frame
-
B
It becomes visible in other files
-
C
It is reset on every function entry
-
D
It retains its value between calls
Correct answer
-
A
A pointer to its first element
Correct answer
-
B
A pointer to its last element
-
C
A copy of the entire array
-
D
The count of its elements
-
A
7
-
B
4
-
C
6
Correct answer
-
D
5
-
A
3
-
B
6
Correct answer
-
C
7
-
D
8
-
A
size_t, an unsigned type
Correct answer
-
B
int, a signed type
-
C
long, a signed type
-
D
unsigned char, one byte
-
A
delivers water directly to the root zone
Correct answer
-
B
floods the entire field with water
-
C
sprays water high into the air
-
D
raises the water table gradually
-
A
pure sand
-
B
heavy clay
-
C
rocky gravel
-
D
loam
Correct answer
-
A
plant viruses
-
B
airborne fungal spores
-
C
small sap-sucking insects
Correct answer
-
D
soil-borne bacteria
-
A
a fungus-like oomycete
Correct answer
-
B
a plant virus
-
C
a soil nematode
-
D
a sap-sucking insect
-
A
growing a single crop variety everywhere in the region
-
B
combining biological, cultural and chemical controls
Correct answer
-
C
spraying insecticides as a routine practice in fields
-
D
destroying all crop residues after harvest completely
-
A
harvesting ripe fruits carefully by hand
-
B
applying chemical fertiliser to the soil
-
C
removing unwanted branches or shoots of a plant
Correct answer
-
D
watering the orchard at regular intervals
-
A
fodder crops for livestock and cattle
-
B
flowers for the commercial cut-flower market
-
C
vegetables and herbs at home for household use
Correct answer
-
D
fruit trees on large commercial orchard farms