0

Pointer problem

Read commented line at the end of code and please try to solve it https://code.sololearn.com/cfZpLU0T6t96/?ref=app

30th May 2022, 4:31 AM
Chahit Bhardwaj
Chahit Bhardwaj - avatar
6 odpowiedzi
0
while loop at line 52 : you are diving the element by 10 until it becomes 0. so it will be 0 only at the end of loop, what else you expect?
30th May 2022, 7:54 AM
Vinit Sonawane
Vinit Sonawane - avatar
0
Ok if I remove while loop syntax then it outputs only 734,but i want whole matrix,how can it done? Vinit Sonawane
30th May 2022, 11:58 AM
Chahit Bhardwaj
Chahit Bhardwaj - avatar
0
What do you want to do exactly? You created the matrix then printed it, then printed its transpose. What do you want to do next?
30th May 2022, 12:20 PM
Vinit Sonawane
Vinit Sonawane - avatar
0
Wants to print whole matrix from main function outside the for loop Vinit Sonawane
30th May 2022, 12:21 PM
Chahit Bhardwaj
Chahit Bhardwaj - avatar
0
You have already done that Line 11 to 23 print matrix, Line 30 to 41 print its transpose
30th May 2022, 12:25 PM
Vinit Sonawane
Vinit Sonawane - avatar
0
Actually what I want is: Iterating the matrix by for loop and assigning each element's address to int element using pointer and use it without using for loop from main function. how can it be achieved? Vinit Sonawane
30th May 2022, 12:41 PM
Chahit Bhardwaj
Chahit Bhardwaj - avatar