Search Header Logo

FP - Topic 2 - Types, Operators and Expressions - Q2

Authored by Thành Ngọc

Computers

University

FP - Topic 2 - Types, Operators and Expressions - Q2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output “1 plus 2 equal 3” and newline.

printf(" plus ");

printf("%d", a);

printf("%d plus %d equal %d\n", a, b, a+b);

printf("%d", b);

printf(" equal ");

2.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of the following are types of operators in C?(Choose 3)

Arithmetic operators
Logical operators
Reference operators
Bitwise operators

3.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of the following are valid arithmetic operators in C?(Choose 3)

+
-
&&
%

4.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of the following expressions will return 1 (true)?(Choose 2)

5 > 2
3 == 4
7 != 7
8 <= 9

5.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of the following are bitwise operators?(Choose 3)

&
|
<<
&&

6.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of the following are true about the unary operator in C?(Choose 2)

It operates on two operands.
It includes increment (++) and decrement (--) operators.
It requires parentheses to function.
It modifies the operand before or after its value is used in an expression.

7.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of the following are valid binary operators in C?(Choose 2)

+
++
-
--

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?