After the first few months of learning programming at my university I have always been including scanf_s("%d");
at the end of the file or at certain strategic places in my code, in order for the console not to disappear once the program has loaded.
I cannot seem to find a concise answer or an explanation as to:
- Why does my console disappear if I do not write
scanf_s("%d");
- I am using Visual Studio 2015 and have noticed that earlier versions do not require this to be written at the end of the code. Why is this?
- Is this considered bad practice` ?