c-programming-mcqs - Set (3)

Correct Answer: Orange && Worng Answer: Red

1. Which of the following is a logical operator?

  • (A). &&
  • (B). !=
  • (C). |
  • (D). All of the above
  • View Answer

    Explanation: In C programming three logical operators i.e. Logical AND(&&), OR(||) and NOT(!).

    2. Which one of the following is a bitwise operator?

  • (A). <
  • (B). <<
  • (C). =
  • (D). ==
  • View Answer

    Explanation: Bitwise left shift(<<), Bitwise right shift(>>)

    3. Which of the following is not a relational operator ?

  • (A). !
  • (B). !=
  • (C). >=
  • (D). <
  • View Answer

    Explanation: Not Avilable

    4. “!=” represents :

  • (A). Greater
  • (B). Equal to
  • (C). Not equal to
  • (D). Lesser
  • View Answer

    Explanation: Not Avilable

    5. What is the symbol used for conditional operator ?

  • (A). ==
  • (B). /
  • (C). ?=
  • (D). ?:
  • View Answer

    Explanation: Not Avilable

    6. Which one of the following is a bitwise operator ?

  • (A). ==
  • (B). =
  • (C). <
  • (D). <<
  • View Answer

    Explanation: Not Avilable

    7. Which one is the special operator ?

  • (A). <<
  • (B). ++
  • (C). ?:
  • (D). Size of()
  • View Answer

    Explanation: Not Avilable

    8. Which of the following is correct precedence order from higher to lower ?

  • (A). (), <<, *, +
  • (B). (), *, <<, +
  • (C). (), *, +, <<
  • (D). *, <<, (), +
  • View Answer

    Explanation: Not Avilable

    9. P++ is called _______ operator.

  • (A). Decrement
  • (B). Post decrement
  • (C). Post increment
  • (D). Pre increment
  • View Answer

    Explanation: Not Avilable

    10. Which of the following is not a relational operator ?

  • (A). !
  • (B). !=
  • (C). >=
  • (D). <
  • View Answer

    Explanation: Not Avilable

    11. Does logical operator in C language are evaluated with short ciruit ?

  • (A). True
  • (B). False
  • (C). Depends on compiler
  • (D). None
  • View Answer

    Explanation: Not Avilable

    12. Realtional operator cannot be used on

  • (A). Structure
  • (B). Long
  • (C). String
  • (D). Float
  • View Answer

    Explanation: Not Avilable

    13. Which of the following is bitwise operator ?

  • (A). &&
  • (B). }}
  • (C). !=
  • (D). &
  • View Answer

    Explanation: Bitwise AND(&), Bitwise OR(|), Bitwise XOR(^)

    14. Which of the following is correct hierarchy of arithmetic operator in C.

  • (A). / + * –
  • (B). * – / +
  • (C). + – / +
  • (D). * / + –
  • View Answer

    Explanation: Not Avilable

    15. Which operators are known as ternary operator ?

  • (A). ::, ?
  • (B). &&
  • (C). ?:
  • (D). None of the above
  • View Answer

    Explanation: Not Avilable