Passing values | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Passing values

Two questions: 1. Do I get it right, that the definition of x is overwritten until the last value, so int x = 5;? (so the code is bad) 2. How is this value 5 passed to int y[3]? Hiw are x an int y[3] connected? https://code.sololearn.com/cF3ufGEj4LB8/?ref=app

12th Jan 2020, 12:04 PM
TobCoder
1 Answer
+ 2
Thanks for your answer! That is what I expected as well (but I am beginner). But why is the output then 5? Just play with the values of x and you will see, that changing the last value, passed to x, will be output.
12th Jan 2020, 1:01 PM
TobCoder