Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Test case for normal input:
- int main() {
- int n = 4;
- int A[4][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
- int row = 1;
- // expected output: 1 2 3 4
- // 9 10 11 12
- // 5 6 7 8
- // 13 14 15 16
- }
- #Test case for edge input:
- int main() {
- int n = 1;
- int A[1][1] = {{1}};
- int row = 0;
- // expected output: 1
- }
- #Test case for negative input:
- int main() {
- int n = 3;
- int A[3][3] = {{-1, -2, -3}, {-4, -5, -6}, {-7, -8, -9}};
- int row = 2;
- // expected output: -1 -2 -3
- // -7 -8 -9
- // -4 -5 -6
- }
- #Test case for decimal input:
- int main() {
- int n = 2;
- int A[2][2] = {{1.5, 2.5}, {3.5, 4.5}};
- int row = 1;
- // expected output: 1.5 2.5
- // 3.5 4.5
- }
- #Test case for large input:
- int main() {
- int n = 5;
- int A[5][5] = {{10, 20, 30, 40, 50}, {60, 70, 80, 90, 100}, {110, 120, 130, 140, 150}, {160, 170, 180, 190, 200}, {210, 220, 230, 240, 250}};
- int row = 3;
- // expected output: 10 20 30 40 50
- // 110 120 130 140 150
- // 60 70 80 90 100
- // 210 220 230 240 250
- // 160 170 180 190 200
- }
Advertisement
Add Comment
Please, Sign In to add comment