Skip to content

Instantly share code, notes, and snippets.

@ragmha
Last active August 29, 2015 14:14
Show Gist options
  • Save ragmha/8890b21a67f794bdba5f to your computer and use it in GitHub Desktop.
Save ragmha/8890b21a67f794bdba5f to your computer and use it in GitHub Desktop.
Pointers7
#include<stdio.h>
int main(){
int carSales[]={14,21,40,65,77};
int *ptr,i;
int n = sizeof(carSales)/sizeof(int);
ptr = carSales;
for(i=0;i<n;i++){
printf("The carSales[%d] => %d\n",i,*(ptr++));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment