+ 1
variable declaration and assignment of value
if it is possible to declare several variables of the same data type in one declaration, is it also possible to assign values to several variables in just one declaration?
2 Answers
+ 2
The best way to learn to Code is to Code so you should first try it by yourself in Code PlayGround and then seek help
What TurtleShell posted is correct and you can even assign values dynamically Refer to the Sololearn course for more info
By your question it seems that you are a begginer so keep coding and again try things yourself first if that doesn't help we are always here to help
Regards...........
+ 1
Use commas
int a, b, c;
If you want to assign values to some of them do it like normal
int a, b = 16, c = 23;