Computer Science, asked by susmithaammumup104xr, 1 year ago

If int a=43;b=5;int c=0;
what value is stored in case when c=a%b

Answers

Answered by sikhi
19
You have typed the wrong syntax
It must be
int a=43,b=5;
int c=0;
c=a%b;

Output will be c=3 as % is called remainder or modulus operator
Which returns the remainder of the 2 numbers.
Hope it helps you

Aiesha: then answer is 8
susmithaammumup104xr: Ok
susmithaammumup104xr: How
Aiesha: because 5 × 8 =40
Aiesha: and 3 will be remainder
susmithaammumup104xr: OK it is integer
Aiesha: and 8 will be quotient
Aiesha: / operator returns quotient
susmithaammumup104xr: Thank you
Aiesha: welcome
Answered by Aiesha
3
Answer is 3...............

susmithaammumup104xr: If they ask c=a/b then answer??
Aiesha: then answer is 8
susmithaammumup104xr: How
Similar questions