Answers for "how to read numbers separated by spaces in c"

C
0

how to read space separated words in c

scanf("%[^\n]%*c", ref_string);
Posted by: Guest on November-13-2020
0

how to input n space separated integers in c

int main() {
    int i, n;
    scanf("%d", &n);
    int arr[n];
    for(i=0;i<n;i++)
        scanf("%d", &arr[i]);
}
Posted by: Guest on January-05-2022

Code answers related to "how to read numbers separated by spaces in c"

Code answers related to "C"

Browse Popular Code Answers by Language