Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void zero_tab( int tab[], int size) {
- int i = 0;
- for (i=0; i<size; i++)
- {
- *tab = 0;
- tab++;
- }
- }
- int tab[] = {2, 5, 7, 6 , 3};
- int size = 5;
- int main(int argc, char *argv[]) {
- printf("%d , %d , %d , %d , %d\n",tab[0],tab[1],tab[2],tab[3],tab[4]);
- zero_tab(tab, size);
- printf("%d , %d , %d , %d , %d\n",tab[0],tab[1],tab[2],tab[3],tab[4]);
- return 0;
- }
Add Comment
Please, Sign In to add comment