Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Federico Vallese, 0000797422*/
- int main()
- {
- int i;
- int righe=3;
- int colonne=3;
- int** B;
- B= (int**) malloc(righe*sizeof(int*));
- for (i=0;i<colonne;i++){
- B[i]=(int*)malloc(colonne*sizeof(int));
- }
- int c;
- int r;
- int k=1;
- for(r=0;r<righe;r++){
- for(c=0;c<colonne;c++){
- B[r][c]=k;
- k++;
- }
- }
- printf("B[0][0] = %d \n",B[0][0]);
- printf("B[1][0] = %d \n",B[1][0]);
- printf("B[0][1] = %d \n",B[0][1]);
- return (0);
- }
- // vede prima le colonne
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement