Different languages, and different libraries.
> Is it the differnet IO library in which case which one is better?
The C++ one.
There are many more things to worry about than the size of an executable for a small program.
Stuff which would require a lot of code (or more libraries) in C come for "free" in the C++ standard library.
The point is, the executable doesn't grow to 1MB by outputting a 3rd line of text.
As most real-world programs are many 1000's (or millions) of lines of code, the initial hit from the standard library is irrelevant.
Or it could simply be down to debug vs. release, or whether static / dynamic libraries are used, or whether debug information is in the .exe or a separate database.
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Offline 7,164 posts
since Dec 2005