Show answerHide answer
Correct answer: (B) Only inside the { } block
Explanation
A variable declared inside a function is local and visible only within that function's { } block.
BPSC TRE · Computer Science
6 Discrete Mathematics (Computer Science) questions asked in BPSC TRE previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.
Other Computer Science topics
Correct answer: (B) Only inside the { } block
Explanation
A variable declared inside a function is local and visible only within that function's { } block.
Correct answer: (D) More than one of the above
Explanation
Hamming code, CRC and checksum are all codes for detecting errors (Hamming can also correct them), so more than one option is correct.
Correct answer: (A) To indicate that the value of a variable does not affect the output
Explanation
A don't-care condition marks an input combination whose output value does not matter, so it can be taken as 0 or 1 to simplify a K-map.
Correct answer: (B) COMPUTE
Explanation
COUNT, SUM, AVG, MIN and MAX are aggregate functions. COMPUTE is not a standard SQL aggregate function.
Correct answer: (A) total number of zero elements > (m × n)/2
Explanation
A matrix is sparse when most of its elements are zero, meaning more than half of the m × n elements.
Correct answer: (A) residual error rate
Explanation
Residual error rate is the transport-layer QoS parameter for the fraction of messages lost or garbled out of all messages sent in the sampling period.
Every question here was asked in a real BPSC TRE paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full BPSC TRE papers as timed tests to check your speed under exam conditions.