Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int tab[10];
- int *p,i;
- for(i=0;i<10;i++)
- {
- tab[i]=0;
- }
- i=5;
- p=tab;
- p=tab+i;
- printf("\t\t\tQuestions de Cours \n\n\n");
- printf("Donnees : i=5 p=tab+i=tab+5 *p =tab[5]=%d .\n(p=adresse ; *p=valeur)\n\n\n",*p);
- (*p)++;
- printf("a) - Operation : (*p)++ \n ==> *p = tab[5] = %d\n\n",*p);
- p++;
- printf("b) - Operation : p++\n ==> *p = tab[6] = %d\n\n",*p);
- (*p)++;
- printf("c) - Operation : (*p)++\n ==> *p = tab[6] = %d\n\n",*p);
- (*(p+2))++;
- printf("d) - Operation : (*(p+2))++\n ==> *p = tab[8] = %d\n\n",*p);
- (*(tab+2))++;
- printf("e) - Operation : (*(tab+2))++\n ==> tab[2] = %d\n\n",tab[2]);
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement