0

Is C similar to C# (C-sharp); or are they completely different ? I was wondering if I should begin learning C# and the transition to C will be a tad bit easier ?

4
Contributors
9
Replies
30
Views
1 Month
Discussion Span
Last Post by Siberian
0

There are similarities between C and C#. You can still write pointer code in C# if you would like to do so. Instead of printf you would use Console.Write in C#. If I were you, begin learning C#.

0

I think you'll find that C# is more akin to C++ than C. I also think that C# will take you in different directions than C, since it is Object Oriented and is fully integrated with the .net librairies, including creating windowed GUI's, web-based, and data based applications. Due to it's very basic code, C, I believe, is favored by many of those that do embedded programming.

0

I'm completely torn between learning C or C#. I've been informed to learn C to which I can simply migrate to C++ fairly easy if I want.

0

Here's my view.

If you are going to write for embedded microprocessors (think tiny!) then C.
If not, just bite the bullet and start with C++.

Now if you are writing Windows Apps I think C# is great. I used that for some of my best apps. They went out to the field and were the least trouble of all our apps.

0

Doesn't C help with understanding how computers and programming work to the core ? You can't write programs with C ? I won't be writting anytime soon Windows Apps or any App in general.

I assume I can use C to write to Raspberry Pi; as well ?

0

@S, I'm going to write no. Many years ago before we had C almost everywhere I wrote in assembler. That demanded we know the processor and system to the core. When we moved to C we didn't have to know as much since it's there to remove the requirement to be intimate with the host details or even what CPU was being used.

As to the assumptions, a google search could confirm that.

0

You can write programs with C. You can even write Windows, Mac, or Linux GUI programs with C. The main disadvantage is that you have to use the native API's for each type of machine, which can create major problems when the OS decides to change the API's you rely on. Another aspect to consider, since C doesn't lend itself to an Object Oriented approach, it's very easy to get into bad programming habits.

If embedded programming is to be your focus, then C is a very good place to start. There are also several good online tutorials that teach using C in embedded programming.

Edited by tinstaafl

0

@tinstaafl, this is a really good area where your choice of C or such can matter. That is, picking C for embedded work is one of your best choices since there's a chance others may understand what you did and be able to maintain or fix it later.

We all have stories. One job had a crushing requirement on cost so the cheapest microcontroller was going to be used and it had no RAM. Just registers and a few hundred bytes of flash memory. The task at hand was to add functionality to an existing system that was omitted and the product was already being sold at or below cost. A salvage job. This meant assembler was the choice and it was done but few dared to review that one. Once done the product finally was sold off and the company moved on much the wiser.

Edited by rproffitt: Spelling.

0

Thanks, what I may do is do some basic understanding of C all the while begin to learn C++; as to understand their differences and structured programming.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.