Posts by Enzo Gaban • 67 points
3 posts
-
0
votes1
answer23
viewsA: Why does the matrix not exist outside the scope of readMatriz()?
The problem is because the value of M is passed by value. When you call the function readMatriz in main, the value of int** M is passed as a copy. It is as if a new int** was created and received…
-
0
votes1
answer443
viewsA: Error '''Segmentation fault core dumped'' in C
Swapping %s for %c should solve the problem since you are trying to print a single character and not a string, as already mentioned by the staff. Just make sure to report a valid value from the…
-
2
votes2
answers111
viewsA: Pointers and matrices catching something unexpected
Why the array was declared with the empty line int'subscript vector[][3] and the difference between int vector[0][3]? In this line you are creating an array. When you stop specifying the amount of…