dereference array

 #include <stdio.h>


void print_array( int *ptr ,int n ){

    for (int i = 0 ; i <n ; i++){

        printf(" The value of element %d is %d\n", i+1 , *(ptr+i));

    }

    return;

}


int main() {

    // Write C code here

   int arr[]={ 34 ,445, 535,3452, 432,53,43};

    

   

    print_array(arr , 7);

    

    return 0;

}

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings