When we take input using for loop in array it scanf function uses '&' but without using for loop ,we use scanf '&' not require ? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

When we take input using for loop in array it scanf function uses '&' but without using for loop ,we use scanf '&' not require ?

15th Nov 2019, 1:17 AM
Ankit Chaturvedi
Ankit Chaturvedi - avatar
1 ответ
+ 2
Yes you can do that but then you wouldn't be able to iterate over every index to provide values. int arr[5]; scanf("%d",arr); The above line still works.
15th Nov 2019, 2:06 AM
Avinesh
Avinesh - avatar