Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7929415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:04:15+00:00 2026-06-03T20:04:15+00:00

I have read C vs C++ stuffs and why C is preferred over C++

  • 0

I have read C vs C++ stuffs and why C is preferred over C++ but what will be the impact of writing C code compiled with a C++ compiler and using in embedded programs, There might be some difference in standard definitions like null pointer etc.

To make it clearer, if I write a embedded.cpp with just c codes and compile with a c++ compiler, will the resulting code be as efficient as the embedded.c code. My guess is C compilers has been highly optimized and produce optimized code. Is that all the reason ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:04:16+00:00Added an answer on June 3, 2026 at 8:04 pm

    Any comparison only makes sense when you are looking at particular compilers. Some leading compilers use the exact same back end for both C++ and C, and library choice (that impacts disk footprint, memory footprint, startup time and almost everything else) is determined quite freely and in a much more granular way than just C vs. C++, supposing you really care.

    So in that case the answer would be, no, the file extension does not matter. But calling a C program C is very good to make your decision to limit the product to C to be understood within your team.

    Note that a lot of the argument against C++ in embedded development comes from an era a decade or more ago when C++ compilers struggled to implement the language correctly, and sometimes at the expense of predictable performance or runtime size. All today’s practical language wars for embedded devepment that are fought close to me tend to be between C++ and C# and C is rarely even remembered.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am stuck with connecting to Oracle DB, have read lots of stuff but
I have read that you can do it, but would this really improve performance
I have read this question but it's not quite what I was looking for.
I have read over this which sort of gives an explanation of when you'd
I have read several post on both matters but I haven't seen anyone comparing
Am building a website which will have articles, policies and laws and text stuffs.
I have a backup system which uses a TStringList, but I code with an
i have read some topics on this, but i don't quite think it answers
I have read a bunch of stuff saying that one con of using the
I have read much about lambda,expression trees amd sort of compiled stuff... now where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.