Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int array[3][7]= { 1,2,3,4,5,6,7,8,9,10,11,12,13, 14,15,16,17,18,19,20, 21};
- int* p = &array[2][2];
- *p = 100;
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 7; j++) {
- printf("%d ,", array[i][j]);
- }
- }
- //printf("%d\n ",array[2][-1]);
- }
- #include <stdio.h>
- ////////////////////////////////////////////////////
- int main()
- {
- //int array[3][7] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 };
- int array[3][7] ,
- x = 1;
- for(int i = 0; i < 3; i++)
- for(int j = 0; j < 7; j++) array[i][j] = x++;
- for(int i = 0; i < 3; i++)
- for(int j = 0; j < 7; j++) printf("%d \n", array[i][j]);
- }
- /*
- */
- /*
- #include <stdio.h>
- ////////////////////////////////////////////////////
- int main()
- {
- //int array[3][7] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 };
- int array[3][7];
- int *p = &array[0][0];
- for(int i = 0; i < 21; i++) p[i] = i + 1;
- for(int i = 0; i < 3; i++)
- for(int j = 0; j < 7; j++) printf("%d \n", array[i][j]);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement