All Free Computer Science and IT MCQs with Answers
Every Computer Science and IT question in the bank, across all chapters, each with the correct answer and a written explanation. Free and unlimited, with no account needed.
2,221 questions · page 71 of 112
- A. 4
- B. 1
- C. S
Explanation: The correct option is (a), 4.There are four main types of constants in most programming languages:Integer constants: These represent whole…
Correct answer: 4- A. 3
- B. 6
- C. 4
- D. 2
Explanation: In C programming, the number 3 is an example of an integer constant. An integer constant is a numeric value that represents a whole…
Correct answer: 3- A. Character
- B. String
- C. Integer
- D. Double
Explanation: The question itself is a bit nonsensical. A numeric constant cannot be divided into floating-point constants.Numeric constant: A numeric…
Correct answer: Double- A. Operators and operands
- B. Comments only
- C. Keywords only
- D. Operators only
Explanation: The correct answer is (a) Operators and operands.(Operators).In C programming, an expression is a combination of variables, constants…
Correct answer: Operators and operands- A. int
- B. long
- C. double
- D. float
Explanation: The correct answer is: (e) double.In most programming languages, when an expression involves operands of different data types, a process…
Correct answer: double- A. 2
- B. 3
- C. 4
- D. 5
Explanation: The correct answer is (a), 2.In C language, there are two main types of comments:Single-line comments: These comments start with "//" and…
Correct answer: 2- A. 2
- B. 2.5
- C. 3
- D. None of these
Explanation: The correct answer is (c) 3.In C programming, when you multiply an integer by a number ending in zero (like 05), the trailing zero is…
Correct answer: 3- A. ROM
- B. RAM
- C. Cache
- D. Register
Explanation: These are small, very fast memory locations within the CPU that hold operands (data) and results used in calculations or instructions.
Correct answer: Register- A. Zero
- B. Garbage
- C. 1
- D. Nothing
Explanation: In C programming, when a variable is declared but not explicitly assigned a value (initialized), its behavior is generally undefined.
Correct answer: Zero- A. Letter
- B. Under score (_)
- C. Digit (0-9)
- D. Both (a) and (b)
Explanation: The correct answer is: (d) Both (a) and (b). In C programming, the first character of a variable name can be either a letter (uppercase or…
Correct answer: Both (a) and (b)- A. 2
- B. 1
- C. 4
- D. 8
Explanation: In most C programming environments, a character type variable typically occupies 1 byte of memory.
Correct answer: 1- A. 1 byte
- B. 2 bytes
- C. .4 bytes
- D. 8 bytes
Explanation: An unsigned long data type typically occupies 4 bytes in memory. This can vary depending on the specific system architecture, but 4 bytes…
Correct answer: .4 bytes- A. Arithmetic overflow
- B. Arithmetic underflow
- C. Truncation
- D. Round off
Explanation: Arithmetic underflow is the phenomenon you are looking for. It happens when the result of a calculation is very small, smaller than the…
Correct answer: Arithmetic underflow- A. int
- B. new
- C. malloc
- D. calloc
Explanation: This function is a standard library function in C used to dynamically allocate a block of memory with a specified size.
Correct answer: malloc- A. float age = 22.5;
- B. int age = 22.5;
- C. double price = 10.99;
- D. All of the above
Explanation: The correct answer is: (d) All of the above. In conclusion, all three options are acceptable ways to declare floating-point variables in…
Correct answer: All of the above1416. the symbol = represents
- A. Assignment operator
- B. comparison operator
- C. Ternary operator
Explanation: In programming languages, the equal sign (=) is most commonly used as an assignment operator.
Correct answer: Assignment operator- A. #include
- B. Int
- C. void
- D. return
Explanation: The correct answer is (a) #include. #include is a preprocessor directive in C.
Correct answer: #include- A. // This is a comment
- B. / This is a comment /
- C. 'This is a comment'
- D. ! This is a comment
Explanation: The correct answer is: (a) // This is a comment. In C programming, a single-line comment starts with two forward slash characters (//) and…
Correct answer: // This is a comment- A. 5
- B. 6
- C. 8
- D. 9
Explanation: The correct option is (d), 9.There are nine basic arithmetic operators in most programming languages:Addition (+): Adds two operands…
Correct answer: 9- A. =
- B. !
- C. AND
- D. ||
Explanation: The correct answer is (a) =. = is an assignment operator in C. It is used to assign a value to a variable.
Correct answer: =