Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
458 B
0
Indexable
Never
// Online C compiler to run C program online
#include <stdio.h>

int main() {
    // Write C code here
    int size = 10;
    int arr[] = {1,2,3,4,5,6,7,0,0,0};
    for(int i = 0;i<size;i++){
        printf("%d ",arr[i]);
    }
    printf("\n");
    
    for(int i = 3; i<9;i++){
        arr[i] = arr[i+1];
        //arr[i+1] = arr[i];
    }
    
    for(int i = 0;i<size;i++){
        printf("%d ",arr[i]);
    }
    printf("\n");
    
    

    return 0;
}
Leave a Comment