1.

Please Answer fast and correctly.Write the output for the following:                                                                   a. Int s=30, t=10; s+=6;      t--;              b. Float p=52 p--;           ​

Answer»

Answer:

A) int s=30, t=10;

s=s+6;

t--;

Output:- for s=36 and t=9

B) FLOAT p=52;

p--;

I don't know which programming language you are using but output for this programme will depend on your programming language.

In JAVA this will give compile time error, because for storing Floating POINT value we have to EXPLICITLY tell to compiler that we are storing Floating value, Like this :- Float p=52F;

But other programming language it's fine.

Output will be 51....



Discussion

No Comment Found