Documente Academic
Documente Profesional
Documente Cultură
void main(){
int *pRand1=&rand1;
printf("\n");
printf("Pointer %p \n",pRand1 );
printf("Pointer %d \n",pRand1 );
//increment the pointer and dereference result and get second item
printf("Second number : %d\n",*(primeNumbers+1));
int * pToSecond=primeNumbers+1;
printf("Second number : %d\n",*pToSecond);
printf("\n");
//*** arrays of string
//create array of pointers
char * students[5]={"lolis","petras","jake","asfdasdfsad","bubu"};
//this also works
//char * students[]={"lolis","petras","jake","asfdasdfsad","bubu"};
printf("\n");
for(int i=0; i<5;i++){
printf("%s : mem_address %d\n",*(students+i),students+i);
}
printf("\n");
char word[]="Test";