Question

In C++, the modulus operator, %, takes any numeric operands. (True or False)

In C++, the modulus operator, %, takes any numeric operands. (True or False)

Homework Answers

Answer #1

Yes.. it's true that modules operator take integers.

For example : x% y

1. If y is divided by x, then result is 0.

2. If y is not divisible bt x, then reminder will be in range of (1, x-1)

3. If x is 0 then it leads to division by zero

Note that

1. % operator is not applied to floating or double numbers which leads to compiler error.

2. For negative integers, it's based on machine independent.. some compiler gives result as 1 for negative and some gives as -1 for negative

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
THE CLAIM OF ANY HYPOTHESIS TEST IS ALWAYS Ha. THIS IS A TRUE-FALSE QUESTION. A. TRUE...
THE CLAIM OF ANY HYPOTHESIS TEST IS ALWAYS Ha. THIS IS A TRUE-FALSE QUESTION. A. TRUE B. FALSE.
Is the following TRUE or FALSE? If any of the problem is FALSE, explain why. 1....
Is the following TRUE or FALSE? If any of the problem is FALSE, explain why. 1. Purchases and sales of securities are always reported as financing activities in a statement of cash flows. TRUE or FALSE 2. Unrealized gains and losses are never included in other comprehensive income for securities that are classified as available for sale. TRUE or FALSE 3. If an investment is accounted for under the equity method, the investor increases investment income and the investment account...
TRUE OR FALSE? In accepting an engagement letter,an auditor takes responsibilities to the public,the client,and other...
TRUE OR FALSE? In accepting an engagement letter,an auditor takes responsibilities to the public,the client,and other members of the profession?
A student takes an 8-question, true-false exam and guesses on each question. Find the probability of...
A student takes an 8-question, true-false exam and guesses on each question. Find the probability of passing if the lowest passing grade is 6 correct out of 8. a. 0.109 b. 0.227 c. 0.144 d. 0.164
2.7 (a) True or false: P(A|B) + P(A|Bc)=1. Either show it true for any event A...
2.7 (a) True or false: P(A|B) + P(A|Bc)=1. Either show it true for any event A and B or exhibit a counter-example. (b) True or false: P(A|B) + P(Ac|B)=1. Either show it true for any event A and B or exhibit a counter-example.
A student takes an exam containing 11 true or false questions if the student guesses what...
A student takes an exam containing 11 true or false questions if the student guesses what is the probability that he will get less than six but more than three questions right
A student takes an exam containing 13 true or false questions. If the student guesses, what...
A student takes an exam containing 13 true or false questions. If the student guesses, what is the probability that he will get exactly 2 questions right? Round your answer to four decimal places.
A student takes an exam containing 15 true or false questions. If the student guesses, what...
A student takes an exam containing 15 true or false questions. If the student guesses, what is the probability that he will get exactly 4 questions right? Round your answer to four decimal places.
True or False: The common stock of any for-profit business can be valued using the dividend...
True or False: The common stock of any for-profit business can be valued using the dividend valuation model. True or False: Under the dividend valuation model, the value of any stock is influenced by both the dividend stream and the expected capital gains.
true or false: Any point on the lowest indifference curve is preferable to a point on...
true or false: Any point on the lowest indifference curve is preferable to a point on a higher indifference curve.