Arithmetic Operators

Last Updated :
Discuss
Comments

Question 1

What is the purpose of arithmetic operators in MongoDB?

  • Insert data

  • Perform mathematical calculations

  • Delete documents

  • Create collections

Question 2

Which operator is used for addition?

  • $sum

  • $add

  • $plus

  • $inc

Question 3

Which operator is used for subtraction?

  • $minus

  • $sub

  • $subtract

  • $diff

Question 4

Which operator is used for multiplication?

  • $multiply

  • $mul

  • $product

  • $times

Question 5

Which operator is used for division?

  • $divide

  • $div

  • $split

  • $ratio

Question 6

Which operator returns the absolute value?

  • $abs

  • $absolute

  • $mod

  • $floor

Question 7

Which operator rounds down to the nearest integer?

  • $ceil

  • $round

  • $floor

  • $int

Question 8

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

  • 15

  • 2

  • 8

  • 53

Question 9

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

  • 6

  • 14

  • -6

  • 40

Question 10

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

  • 7

  • 10

  • 25

  • 3

There are 15 questions to complete.

Take a part in the ongoing discussion