Assume that int a = 3, b = 4, c = -2; What is the value of a / b?
Answers
Answered by
0
the value of a/b is 0
given
int a = 3, b = 4, c = -2
to find
a / b
solution
- we will solve this question using c programming language
- now according to c programming language any operation that is being performed on operands gives us the result in the data type that is being input as the operand.
- while solving a/b the result will be int, float or any other type will depend upon the data type of "a" as well as "b"
- now in the above question all the given parameter are in integer type . so the result will be integer
- now solving mathematically
a/b = 3/4 = 0.75
- but in the programming language it will yield 0 as 0 is the integer while .75 is the decimal or float part and it will not be considered in the output as explained above.
the value of a/b is 0
#SPJ3
Similar questions
English,
4 months ago
India Languages,
4 months ago
English,
4 months ago
Geography,
8 months ago
Math,
11 months ago