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 72 of 112

  • A. Assignment operator
  • B. Unary operator
  • C. Ternary operator
  • D. Binary operator

Explanation: The correct answer is: (b) Unary operator. Decrement operator (--) is a unary operator that subtracts 1 from the value of its operand (the…

Correct answer: Unary operator
  • A. Binary operator
  • B. Unary operator
  • C. Bitwise operator

Explanation: The logical NOT operator (!) is indeed a binary operator in C. However, this answer choice seems to be a mistake in the image you sent.

Correct answer: Binary operator
  • A. Assignment Operator
  • B. Binary Operator
  • C. Unary Operators
  • D. Ternary Operator

Explanation: Unary operators only require one operand. They are used to perform operations on a single value.

Correct answer: Unary Operators
  • A. Preprocessor
  • B. Functions
  • C. Assignment (not shown in the options list but relevant to readability)
  • D. Comments
  • E. all of the above

Explanation: (d) Comments and all of the above (e) .In conclusion, all of the above options (comments, functions, and meaningful variable names) can be…

Correct answer: all of the above
  • A. +
  • B. -
  • C. %
  • D. >

Explanation: > is the greater than operator. This is a relational operator, which is used to compare the values of two operands.

Correct answer: >
  • A. Different type expression
  • B. Same type expression
  • C. int. float type expression
  • D. Mixed type expression

Explanation: The correct option is (d) Mixed type expression. An expression is a combination of values, variables, and operators that evaluates to a…

Correct answer: Mixed type expression
  • A. Exponentiation
  • B. Multiplication
  • C. Integer remainder
  • D. Division

Explanation: The modulus operator, denoted by %, is used to find the remainder after a division operation.

Correct answer: Integer remainder
  • A. Expressions
  • B. Comments
  • C. Operator procedures
  • D. Equal operator

Explanation: Comments are lines of code that are ignored by the compiler. They are used to provide information about the code for programmers who are…

Correct answer: Comments
  • A. 1
  • B. 3
  • C. 8
  • D. 5

Explanation: The correct option is (b) 3. In most programming languages, the percent (%) operator is the modulo operator, which calculates the…

Correct answer: 3
  • A. Modulus
  • B. Increment
  • C. Decrement
  • D. All of above

Explanation: The increment operator, denoted by ++, is used to increase the value of a variable by 1.

Correct answer: Increment
  • A. Numbers
  • B. Underscore (_)
  • C. Letters
  • D. Period (.)

Explanation: While some languages allow periods within variable names (like Python), it's generally discouraged because periods have a special meaning…

Correct answer: Period (.)
  • A. j = 21
  • B. j = 20
  • C. j = 2
  • D. i = 23

Explanation: The correct option is (c) j = 2.Let's break down the expression to understand how we arrive at the answer:i = 0: This assigns the initial…

Correct answer: j = 2
  • A. Zero
  • B. One
  • C. Less than Zero
  • D. Both (a) and (b)

Explanation: While both 0 and 1 are used in some languages to represent boolean values, a relational expression typically evaluates to just one of…

Correct answer: Both (a) and (b)
  • A. (*)
  • B. //
  • C. \
  • D. :

Explanation: In many programming languages, // is the syntax for a single-line comment.

Correct answer: //
  • A. a123
  • B. My name
  • C. int
  • D. Both (b) and (c)

Explanation: The correct option is (c) int. Variable names follow specific rules depending on the programming language.

Correct answer: int
  • A. Function
  • B. Data types
  • C. Keywords
  • D. Both (b) and (c)

Explanation: Function: Functions are blocks of code that perform a specific task. While functions are essential components of a program, they are not…

Correct answer: Both (b) and (c)
  • A. Addition (+)
  • B. Subtraction (-)
  • C. Multiplication (*)
  • D. Division (/)

Explanation: In C, addition, subtraction, and multiplication are binary operators, meaning they operate on two operands.

Correct answer: Division (/)
  • A. a=77
  • B. b=40
  • C. a=117
  • D. Compile time error

Explanation: int a,b;: This line declares two integer variables a and b.a=77;: This line assigns the value 77 to variable a.b=40;: This line assigns…

Correct answer: a=117
  • A. 6
  • B. 7
  • C. 8
  • D. run time error

Explanation: The correct option is (b) 7.Let's break down the code step by step:a=117: This line assigns the value 117 to the variable a.

Correct answer: 7
  • A. 15
  • B. 16
  • C. 17
  • D. Compile time error

Explanation: The code contains two errors that would lead to a compilation error:Data type mismatch: In C, integer is not a valid data type.

Correct answer: Compile time error