+ 3

How do you say int 1=a and use it in the program

5th Jan 2017, 2:07 AM
Nitish
Nitish - avatar
3 odpowiedzi
+ 5
You can't type "1=a" because "=" is right-to-left operator, it means it takes the value of the right expression of "=" and put it into the left variable of "=" not the opposite. you can type "int a=1;" but you can't type "int 1=a:"
5th Jan 2017, 3:00 AM
Mohamed Ahmed Ramadan
Mohamed Ahmed Ramadan - avatar
0
is 1 = 2 or 1=3? no ? then we can never write 1 = a. because computer is uncertain that which value you are gonna fit in a.
5th Jan 2017, 3:33 PM
Praveen Kumar
Praveen Kumar - avatar
- 1
by saying 1=a u are asking the computer to take "1" a fixed integer value to be equal to a variable u know that "a" can be give any value for instance if "a" was given 8 value then from above statement 1=8 which is logically wrong
5th Jan 2017, 3:36 AM
Rahul Prasad
Rahul Prasad - avatar