New answers tagged

1

This is heavily dependent on the source language, target language, compiler, etc... In general, it is possible the size of the compiled code to be both larger and smaller than the source code (but not simultaneously :p) For example, on my machine, the following code compiles to an executable of 16456 bytes (compiled with g++ with size optimization -Os) ...


0

This depends on how the libraries used were linked in. If you statically link many libraries in you’ll end up with a much bigger executable. So the executable can easily exceed the size of the source code, but the individual object files (pre-linking) that go with the code just compiled may be smaller. EDIT: Some others considerations apart from library ...


Top 50 recent answers are included