+ 3
Why results are different ??
Tell me please https://code.sololearn.com/cJ2c1OF13NRv/?ref=app https://code.sololearn.com/caQVoCgI55TG/?ref=app
5 Respuestas
+ 5
When you write x=1,2,3; the compiler understands:
* assign 1 to x
* assign 2 to nothing
* assign 3 to nothing
When you write int x=1,2,3; the compiler understands:
* create a variable x and assign 1 to it
* create a variable named 2 -> this is an invalid name -> it tells you that it expects an unqualified-id
* create a variable named 3 -> this is an invalid name
+ 7
RITIK KUMAR this happens because when you write int x=1,2,3; the compiler treats 2 and 3 as variables but we know that variable name can't start with a number. So the program gives an error.
+ 3
Thanks bro
+ 3
Thanks LIOÑ
+ 2
Thanks bro