Find the value of a and c?
main ()
{ int a.b.c;
b=2;
a=2*(b++);
c=2*(++b)
}
Answers
Answered by
0
a=6
c=4
hope it helped u
c=4
hope it helped u
Answered by
2
The value of 'a' is 4.
The value of 'c' is 8.
Explanation:
first remember the value of 'b' that is 2.
value of 'a':-
a=2*(b++);
First multiple the value of 'b' that is 2 with 2 and then increment the value of 'b' because of post-increment. The value of 'b' becomes now 3.
Value of 'c':-
c=2*(++b);
Now fist increment the value of 'b' because of pre-increment and becomes 4 and then multiple it with 2.
Similar questions