+ 1

so instead of int a; a=10; I can do it like this too int a=10; ?

Im reviewing variables and i found out this question

3rd Jun 2017, 3:22 PM
Joshuel Ernest Q. Simbulan
Joshuel Ernest Q. Simbulan - avatar
6 odpowiedzi
+ 4
1: auto a = 1; 2: auto a; a=1; Which one is error,huh? Yep It's '2'
3rd Jun 2017, 3:29 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 1
yeah
3rd Jun 2017, 3:25 PM
_Retr0/-
_Retr0/- - avatar
+ 1
I think so someone correct me if am wrong
3rd Jun 2017, 3:25 PM
_Retr0/-
_Retr0/- - avatar
0
Yes you can set the value of 'a' when creating 'a'. int a = 15; Ok, this will create an int called a, and set the value to 15.
3rd Jun 2017, 3:29 PM
Rrestoring faith
Rrestoring faith - avatar
0
yeah both are same😀
5th Jun 2017, 7:41 AM
Kishan Singh
Kishan Singh - avatar
- 1
a
4th Jun 2017, 4:26 AM
vardaan
vardaan - avatar