printing value for arry in c

#include<stdio.h>

int printArry(int *ptr, int n){
for(int i=0;i<n;i++){
printf("The value of element %d is & %d\n",i+1,ptr[i]);
}
ptr[2]= 555;//This value will be change in arry of main as well
}
int main()
{
    int arr[] = {45,445,4546,44,465};
   
    printArry(arr,5) ;
    printf("%d",arr[2]);
   
return 0;

Comments

Popular posts from this blog

create a num table in a new file in c

write a programme to compare time stamp in c

write a struct programme to keep bank details in c