+ 1
I don't know what wrong with my code.it show some random memory..
I need to create a binary file that will receive 4 students marks for 3 subject each.. I've done the code, but when i run it, i found out DM subject didn't receive the right input..when i print it, it display some random memory. I see nothing wrong there, can anyone explain what actually happen? * The bug is in line 25 https://code.sololearn.com/cUV84BkAOS87/?ref=app
6 Answers
+ 6
I noticed you used address-of & operator for printing the 'DM' field at line 30. Could that be the issue? cause you said "some random memory".
+ 1
Thanks for the advice, i got it now.
+ 1
Martin Taylor ohh.. I thought it's the same thing because when i run it, it also can generate my expected output.. I see it now, I'll take your advice seriously