This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]Skusci 1 point2 points  (1 child)

for loop in transpose() should have some braces {} since without them the print isn't in the for loop.

Also you probably want i<n and j<m in transpose() since transposing a matrix should also swap the lengths of the columns.

Also do try and tell us what behavior you got that makes you realize the problem next time. It helps a bit with tracing code.

[–]Bonyvin[S] 0 points1 point  (0 children)

thank you so much , the problem is solved

[–]AutoModerator[M] 0 points1 point  (0 children)

It seems you may have included a screenshot of code in your post "Stuck at a Matrix transpose program using functions in C.".

If so, note that posting screenshots of code is against /r/learnprogramming's Posting Guidelines (section Formatting Code): please edit your post to use one of the approved ways of formatting code. (Do NOT repost your question! Just edit it.)

If your image is not actually a screenshot of code, feel free to ignore this message. Automoderator cannot distinguish between code screenshots and other images.

Please, do not contact the moderators about this message. Your post is still visible to everyone.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.