home *** CD-ROM | disk | FTP | other *** search
- /*********************************************************************
- * CH09_08.C Passage d'un tableau α une fonction *
- * l'alternative du pointeur *
- *********************************************************************/
-
- #include<stdio.h>
-
- void RemiseZero( int*);
-
- main( void)
- {
- int i, tab[]= { 4, 3, 2, 1, 0};
-
- RemiseZero( tab);
-
- for( i= 0; i< 5; i++) printf("\n tab[%d]= %d", i , tab[i]);
- }
-
- void RemiseZero( int *ptr0)
- {
- int i;
-
- for( i= 0; i< 5; i++) *ptr0++= 0;
- }
-
-