Ubuntu Pastebin

Paste from costamagnagianfranco at Thu, 6 Apr 2017 08:14:55 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>
#include <stdlib.h>

int main(){
        int n;
        int a[n];
        int i;

        printf("Size of a array %lu\n", sizeof(a));

        printf("Input n: ");
        scanf("%d", &n);

        for(i = 0; i < n; i++){
                printf("Insert number: ");
                scanf("%d", &a[i]);
        }

        for(i = 0; i < n; i++){
                printf("a[%d]: %d\n", i, a[i]);
        }

        return 0;
}
Download as text