Answers for "taking input array in c"

C
13

take array as input in c

int size=5;
int array[size]; // array of size=5;

for(i=0;i<size;i++){
   scanf("%d",&array[i]);
                }
Posted by: Guest on November-05-2020
0

inputting an array in c

int i, arr[10];

for(i = 0; i < sizeof(arr) / sizeof(struct i); i++)
{
  cin >> (arr[i].data);
}
Posted by: Guest on February-28-2022

Code answers related to "C"

Browse Popular Code Answers by Language