(ii) Evaluate the given expression when the value of a=2 and b=3
b*=a++ - ++b + ++a;
System.out.println ("a= "+a);
System.out.println ("b="+b);


Solution



b=b*a++ - ++b + ++a
= 3*2 - 4 + 4
= 6-4+4
=6
Hence a=4 and b=6



Reach Us

SERVICES

  • ACADEMIC
  • ON-LINE PREPARATION
  • FOUNDATION & CRASH COURSES

CONTACT

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 91790552 9739