Thread: Question about C-Compilers

  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    3

    Question about C-Compilers

    Hi again everyone!

    I'm a complete newbie. Just started learning C today. I have 4 questions about compilers.

    (Note: I have a Windows-XP machine.)


    1) Today I learnt that many C++ compilers will also compile code that is written in C.

    Is there any difference in the final ".exe" file that is created by a purely "C" oriented compiler, versus that created by a more C++ oriented compiler?


    2) For example, if I create and compile my C programs in an IDE that is mainly used by C++ programmers, will the final compiled .exe of my C-code run as fast, and be as efficient?

    Or would my program run faster and be significantly more efficient if I compiled it with a compiler that is "purely" dedicated to C programs only?


    3) Generally speaking for both C and C++, what is the best and most popular current C/C++ IDE compiler?


    4) What is the best "purely" C oriented compiler (not C++) for Windows machines that is either command-line or IDE based?


    Thanks again for all your help!

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by intrinsic_value
    1) Today I learnt that many C++ compilers will also compile code that is written in C.
    Not quite: many C++ compilers come with a corresponding C compiler that may be invoked if say, specific options are passed to the compiler, or if a C file extension is detected. Additionally, a C++ compiler would compile a valid C program that is also a valid C++ program.

    Quote Originally Posted by intrinsic_value
    Is there any difference in the final ".exe" file that is created by a purely "C" oriented compiler, versus that created by a more C++ oriented compiler?
    This depends on the compilers and the programs.

    Quote Originally Posted by intrinsic_value
    3) Generally speaking for both C and C++, what is the best and most popular current C/C++ IDE compiler?
    "Best" is subjective and depends on your requirements and preferences. As for popularity: GCC and the Microsoft compilers appear to be quite popular. Code::Blocks and Microsoft Visual Studio appear to be quite popular among IDEs.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question about a question
    By hausburn in forum C++ Programming
    Replies: 3
    Last Post: 04-25-2010, 05:24 AM
  2. SDL buffer channels question
    By TriKri in forum Game Programming
    Replies: 3
    Last Post: 12-09-2009, 05:52 PM
  3. Newbie question, C #
    By mate222 in forum C# Programming
    Replies: 4
    Last Post: 12-01-2009, 06:24 AM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM