Computer Science, asked by dsharda993, 6 months ago

what value will be store in x and y after executing int x= 10 , y ;​

Answers

Answered by Anonymous
0

In any programming language the variable stores the value assigned to it.

If the language is C++ then x will store 10 (as an integer) and y will store 6422376 (as an integer).

And if the language is Java then x will store 10 (as in integer) and for y it will return an error saying "The local variable y may not have been initialized.", to fix this just write "int x = 10, y = 0;" or "int x = 10, y = null;".

Note: Remove double quotes while writing the above code sample.

Similar questions