Bnahmad15's blog

By Bnahmad15, history, 8 years ago, In English

Hi guys I had a problem here I was solving a problem and I am writing my solution on ideone.com when I tried it on ideone it gives me 2 and when I submit here it gives me 1 ??? what is this plz help me :D :D

  • Vote: I like it
  • -14
  • Vote: I do not like it

»
8 years ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

you are probably doing something that gives undefined behaviour for example you don't give an integer a value in a function and you use the integer so every time you use the integer you have a random value in it sometimes it might affect you answer sometimes it doesn't.

P.S there are other things that can cause undefined behaviour.