Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #define LIGNE_TABLEAU 5
- #define COLONNE_TABLEAU 4
- int *cree_tableau(void);
- int main(void)
- {
- int i = 0, j = 0;
- //char *tableau = creeTableau();
- int *tab = cree_tableau();
- for (int i = 0; i < 5; ++i)
- {
- for( j = 0; j < COLONNE_TABLEAU; j++)
- {
- printf("[%d] ",tab[i][j]);
- }
- }
- return 0;
- }
- int *cree_tableau(void)
- {
- int i =0, j = 0;
- static int tableau_entier[LIGNE_TABLEAU][COLONNE_TABLEAU];
- for (int i = 0; i < 5; ++i)
- {
- for (int j = 0; j < COLONNE_TABLEAU; ++j)
- {
- tableau_entier[i][j] = i + j * 3;
- }
- }
- return tableau_entier;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement