Computer Science, asked by meenaharshi19723, 2 months ago

Q2.
What will be the value of x?if a =5 and b =4?
x=++a + --b + a++ + b++ + a;
03.What will be the result by the expression:
int Y=A+B>1750? 400 :500 if value of A and B is:
1. A=1000 ,B =800 2. A =750,
B =800
Q4. What will be the output of the following print statement
1. int a =12;
System. out. println(++a);
System .out .println(a++);
System .out. print( a++);
System .out .print(++a);
System .out. println( a);
2.int x=5;
System .out.print( x++);
System .out.println(++x);
System .out .println(x);
Q5.
Write true and false :
1.The symbol? and :are known as ternary operator
2.The = = is used for comparison
3.The - operator is used As String Concatenation
4.The keywords cannot be used as identifier names​

Answers

Answered by kirti222
0

System. out. println(++a);

System .out .println(a++);

System .out. print( a++);

System .out .print(++a);

System .out. println( a);

2.int x=5;

System .out.print( x++);

System .out.println(++x);

System .out .println(x);

Similar questions