Introduction to Computing MCQs with Answers
Practice important Introduction to Computing MCQs with answers and explanations.
Chapter: 122
Q1781:
Fill in the blank: In parallel processing, the program unit requesting a function _________.
A. Waits for the function to complete
B. Continues execution while the function executes
C. Stops execution until the function finishes
D. Is terminated until the function is complete
Correct Answer:
B
Chapter: 122
Q1782:
What issue arises when two threads manipulate the same data concurrently?
A. Data integrity issues
B. Improved performance
C. Increased accuracy
D. Simplified coding
Correct Answer:
A
Chapter: 122
Q1783:
Fill in the blank: Data that can be accessed by only one thread at a time is said to have ________.
A. Shared access
B. Mutually exclusive access
C. Concurrent access
D. Public access
Correct Answer:
B
Chapter: 122
Q1784:
How can mutually exclusive access be implemented when threads need to access shared data?
A. By blocking other threads from accessing the data
B. By using multiple CPU cores
C. By avoiding the use of shared data
D. By allowing simultaneous access
Correct Answer:
A
Chapter: 122
Q1785:
In the context of parallel processing, what does spawning threads refer to?
A. Creating new threads
B. Waiting for threads to complete
C. Terminating threads
D. Accessing shared data
Correct Answer:
A
Chapter: 122
Q1786:
Which programming language uses the term "thread" for concurrent activities?
A. Ada
B. Java
C. C++
D. Python
Correct Answer:
B
Chapter: 122
Q1787:
Fill in the blank: When a thread is using shared data, other threads may be blocked from accessing that data until ______.
A. The data is modified
B. The thread completes its task
C. The thread is terminated
D. The data is reset
Correct Answer:
B
Chapter: 122
Q1788:
What might threads need to communicate about in a parallel processing scenario involving multiple spaceships?
A. Their locations
B. Their execution time
C. Their thread counts
D. Their memory usage
Correct Answer:
A
Chapter: 123
Q1789:
What does the / operator do in C when both operands are integers?
A. Divides and returns a decimal
B. Divides and returns an integer
C. Multiplies operands
D. Subtracts operands
Correct Answer:
B
Chapter: 123
Q1790:
What is the result of 5.0 / 2.0 in C?
A. 2
B. 2.5
C. 2
D. 5
Correct Answer:
B
Chapter: 123
Q1791:
Which operator is used to find the remainder after division in C?
A. +
B. -
C. *
D. %
Correct Answer:
D
Chapter: 123
Q1792:
Fill in the blank: The modulus operator (%) in C gives the _______ after division.
A. Quotient
B. Remainder
C. Product
D. Difference
Correct Answer:
B
Chapter: 123
Q1793:
What is the result of 5 % 2 in C?
A. 2
B. 1
D. 5
Correct Answer:
B
Chapter: 123
Q1794:
If x and y are both integers in C, what is the result of x / y if x = 7 and y = 3?
A. 2
B. 2.33
C. 3
D. 1
Correct Answer:
A
Chapter: 123
Q1795:
Fill in the blank: If one operand of / in C is a decimal and the other is an integer, the result is ________.
A. Always an integer
B. Always a decimal
C. The integer part of the result
D. The decimal part of the result
Correct Answer:
B
Chapter: 123
Q1796:
Which arithmetic operator in C would give you a result that includes only the whole number part of a division?
A. +
B. *
C. /
D. %
Correct Answer:
C
Chapter: 123
Q1797:
What is the difference between 5 / 2 and 5.0 / 2.0 in C?
A. 5 / 2 returns a decimal
B. 5.0 / 2.0 returns an integer
C. 5 / 2 returns an integer
D. 5.0 / 2.0 returns a decimal
Correct Answer:
C
Chapter: 123
Q1798:
Fill in the blank: To obtain the integer part of the division of two integers in C, use the ________ operator.
A. +
B. *
C. /
D. %
Correct Answer:
C
Chapter: 123
Q1799:
In C, what operator would you use to obtain the remainder of 17 / 4?
A. +
B. *
C. /
D. %
Correct Answer:
D
Chapter: 123
Q1800:
What is the result of 17 % 4 in C?
A. 1
B. 4
C. 3
D. 2
Correct Answer:
C