Computer Science, asked by ngopalgopal2124, 2 months ago

int a=10, b=5;

int c= a/b;

int d= a%b;

What will be the output of c and d ?​

Answers

Answered by UTKARSH3837
4

Answer:

2

0

Explanation:

please Mark it as brainiest

Answered by RashmiDulgach
1

Explanation:

First of all you have to reduce one decreament sign and then the question should be as..

If 'b=10', 'a= b--' , so 'a= ?'

And the answer will be '10' because

In c language 'b--' denotes post decreament . So first the same value will saved and printed and then the deacreament will be done by '1'.

So in this question..

'a= 10' and if 'b' will be asked ,, it will be 'b= 9'

Now if 'a=--b'

Here '--b' denotes pre decreament in which first of all all the value is reduced by '1' and then it is saved and printed.

So the value of 'a' will be

'a= 9: and 'b= 9'.

Similar questions