Hey!
I'm brand new to programming in C and I am trying to practice coding by hand for my test tomorrow. I understand the basic concepts and I do have some experience in Java (not much) but I am horrible at coding by hand...
anyway I am doing my best but I can't be sure if this is how to add items to an array (it doesn't seem right to me anyway...) Any help would be appreciated!
Thanks!
/*program that takes in 20 int's and stores them in an array then prints them out at the end
*/
#include <stdio.h>
int main(){
int i;
int arr[20];
for(i=0; i<20; i++){
scanf("%d", arr[i]);
}
{
for(i=0; i<20; i++){
printf("%d", arr[i]);
}
return 0;
}