Quiz about Arithmetic Operators

Arithmetic Operators

Last Updated :
Discuss
Comments

Question 1

What is the purpose of arithmetic operators in MongoDB?

  • A

    Insert data

  • B

    Perform mathematical calculations

  • C

    Delete documents

  • D

    Create collections

Question 2

Which operator is used for addition?

  • A

    $sum

  • B

    $add

  • C

    $plus

  • D

    $inc

Question 3

Which operator is used for subtraction?

  • A

    $minus

  • B

    $sub

  • C

    $subtract

  • D

    $diff

Question 4

Which operator is used for multiplication?

  • A

    $multiply

  • B

    $mul

  • C

    $product

  • D

    $times

Question 5

Which operator is used for division?

  • A

    $divide

  • B

    $div

  • C

    $split

  • D

    $ratio

Question 6

Which operator returns the absolute value?

  • A

    $abs

  • B

    $absolute

  • C

    $mod

  • D

    $floor

Question 7

Which operator rounds down to the nearest integer?

  • A

    $ceil

  • B

    $round

  • C

    $floor

  • D

    $int

Question 8

What is the result of $add: [5, 3]?

  • A

    15

  • B

    2

  • C

    8

  • D

    53

Question 9

What is the result of $subtract: [10, 4]?

  • A

    6

  • B

    14

  • C

    -6

  • D

    40

Question 10

What is the result of $multiply: [2, 5]?

  • A

    7

  • B

    10

  • C

    25

  • D

    3

There are 15 questions to complete.

Take a part in the ongoing discussion