Operators – Part 1

Advertisements
Advertisements
Advertisements3
Advertisements4
Advertisements6
Advertisements66
 

 1. What is the output of following pseudo code? int a=350; System.out.println(~a)

Ans. -351.

2. What is the output of following pseudo code? int a=118; System.out.println(a++ + ++a);

Ans. 238.

3. What is the output of the following pseudo-code? int a= 118; System.out.println(a++ + a++);

Ans. 237.

4. What is the output of the following pseudo-code? System.out.println(102*110/15+43-21*94/20);

Ans. 693.

5. What is the output of the following pseudo-code? System.out.println(115<<42);

Ans. 117760.

6. What is the output of following pseudo code? int a= 2+3<<5/6; int b=6>>4%4; int res= (a<b)?b:a; system.out.println(res);

Ans. 6

 
 
 
 
 
 

Author: Lakshmi Prasanna Ponnala

Completed M.Tech in Digital Electronics and Communication Systems.

Leave a Reply

error: Content is protected !!

Discover more from ece4uplp

Subscribe now to keep reading and get access to the full archive.

Continue reading