digdig's blog

By digdig, history, 2 weeks ago, In English

Recently I was submitting code and I realized that when you making new function using ll or int it will give memory exceed issue, instead of it I used void and it passed. Just wondering why???

  • Vote: I like it
  • +2
  • Vote: I do not like it

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

A void doesn't return anything, while anything else return their corresponding datatypes. So we can conclude that a void doesn't take any memory, whereas int or ll do

»
2 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

if you indicate that the function should return something, and it doesnt, it leads to undefined behaviour