1)What is the value of x after evaluating:
x+ =x+++--x+4;
if x=3,before the evaluation?
2)Evaluate the following Java expressions where a,b,c are integers and d,f are floating point numbers.
The value of a=5,b=3 and d=1.5 .
(a)f =a+b/a
(b)c=d*a+b
(c)c+(a++)*d+a
(d)f=(++b)*b-a
(e)c=a-(b++)*(__d)
3)Illustrate '?' operator.
4)What is the difference between post-increment and pre-increment?If a=4 gives values of ++a and a++.
5)What is the meaning of variable++?
6)What does the following program output to the monitor:
int value=0;
int value=1;
value=count++;
System.out.println("value"+value"+count:"+count);
2007-04-20
06:06:08
·
2 answers
·
asked by
Sumit
1
in
Programming & Design