Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
372 B
4
Indexable
Never
// Online C compiler to run C program online
#include <stdio.h>

int main() {
    
    int v[5];
    int i = 0;
    int *p = v;
    while (p != v + 5) {
        *p++ = 0;
        printf("%p, %d; %p, %d\n", p, *p, v + i , v[i]);
        i++;
    }
    
    printf("======\n");
    
    i = 0;
    for (i = 0; i<5; i++) {
        printf("%d\n", v[i]);
    }

    return 0;
}