Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- //1D array n elements
- int *A;
- A = (int *) calloc (n, sizeof (int));
- //2D array n*n elements
- int **B;
- B = (int **) calloc (n, sizeof (int));
- for(int i = 0; i < n; i++)
- B[i] = (int *) calloc (n, sizeof (int));
- }
Add Comment
Please, Sign In to add comment