+ 3

Do comments use disk space?

If I have thousands of lines of code, heavily commented, will the comments effect the program size

28th Jun 2018, 2:27 PM
Amine Trabelsi
Amine Trabelsi - avatar
4 Antworten
+ 5
Commented out lines of the code doesn't affect on the exe file size because all comments are discarded at the compilation stage, but since the source code is a plain text file, adding characters (whether comments or executable codes) to the file will increase the size of the source code file stored on the disk.
28th Jun 2018, 3:21 PM
To Seek Glory in Battle is Glorious
To Seek Glory in Battle is Glorious - avatar
0
noo
30th Jun 2018, 6:10 AM
ankita
ankita - avatar
0
since system has to remember the commented sentence hence acquire some memory in the disk.
30th Jun 2018, 2:58 PM
Satyam Rai
Satyam Rai - avatar
- 3
yes
30th Jun 2018, 2:57 PM
Satyam Rai
Satyam Rai - avatar