- Home
- MCQs by exam
- NTS
NTS MCQs · Page 170
5,604 multiple choice questions typical of the NTS exam, with answers and explanations. Switch on practice mode to test yourself first.
-
A
5
-
B
4
-
C
7
-
D
6
Correct answer
-
A
&&
-
B
||
-
C
??
-
D
?:
Correct answer
-
A
the file size
-
B
a FILE pointer
Correct answer
-
C
an integer file descriptor only
-
D
a character buffer
-
A
indeterminate garbage
Correct answer
-
B
always zero
-
C
always NULL
-
D
a compile-time error
-
A
exits the loop entirely at once and moves on
-
B
jumps to the end of the current function call body
-
C
resets the loop counter back to zero again
-
D
skips the remaining statements of the current iteration
Correct answer
-
A
exit the innermost loop or switch immediately
Correct answer
-
B
skip only the current iteration of the loop
-
C
restart the loop from its very beginning
-
D
terminate the whole program at once
-
A
a base case that stops the recursion
Correct answer
-
B
a global variable declared outside
-
C
a return type of void
-
D
at least two formal parameters
-
A
::
-
B
*
-
C
.
Correct answer
-
D
->
-
A
string.h
Correct answer
-
B
stdio.h
-
C
stdlib.h
-
D
ctype.h
-
A
the null character '\0'
Correct answer
-
B
a newline character
-
C
a space character
-
D
the character 'EOF'
-
A
->
-
B
.
-
C
&
Correct answer
-
D
*
-
A
%f
Correct answer
-
B
%d
-
C
%c
-
D
%s
-
A
the number of characters excluding the null terminator
Correct answer
-
B
the number of characters including the null terminator
-
C
the size of the allocated buffer
-
D
the number of words in a string
-
A
clear the terminal screen
-
B
release dynamically allocated memory
Correct answer
-
C
delete a file permanently from disk
-
D
close an open file handle
-
A
stdio.h
-
B
malloc.h
-
C
memory.h
-
D
stdlib.h
Correct answer
-
A
the size of a variable
-
B
a function name
-
C
a memory address
Correct answer
-
D
a copy of the data itself
-
A
0
Correct answer
-
B
1
-
C
−1
-
D
the array name
-
A
stdlib.h
-
B
string.h
-
C
math.h
-
D
stdio.h
Correct answer
-
A
4 bytes
Correct answer
-
B
2 bytes
-
C
8 bytes
-
D
1 byte
-
A
cos²x
-
B
−cosec²x
-
C
sec²x
Correct answer
-
D
sec x tan x
-
A
9
-
B
3
-
C
12
-
D
6
Correct answer
-
A
−sin x
Correct answer
-
B
sin x
-
C
−cos x
-
D
tan x
-
A
1/x
Correct answer
-
B
ln x
-
C
x
-
D
1/x²
-
A
½
-
B
0
-
C
1
Correct answer
-
D
2
-
A
sin x + C
Correct answer
-
B
−sin x + C
-
C
cos x + C
-
D
tan x + C