Difference between C, C++, and C#

Hey there! Ever wondered what the difference is between these three programming languages? Well in simple terms:

C - It’s a programming language that gives you direct control over hardware. So this means it’s great for system level programming but it requires you to manage a lot of stuff manually.

C++ - This is basically an extension of C with object oriented stuff (like classes, objects, etc.) along with some other modern programming constructs. This allows you to build more complex stuff while still being close to the hardware.

C# - This is a modern, high level language made by Microsoft for the .NET framework, designed to be easier with features like automatic memory management and a rich library ecosystem, so it’s ideal if you want to make applications without worrying about low level details. If you’ve ever gone onto YouTube and looked up tutorials to make a desktop app using visual studio, then you’ve probably used WinForms to make it (that uses C#)


Here’s what they look like:

C:

#include <stdio.h>

int main() {
    printf("Hello, World!\n");
    return 0;
}

C++:

#include <iostream>
using namespace std;

int main() {
    cout << "Hello, World!" << endl;
    return 0;
}

C#:

using System;

class Program {
    static void Main() {
        Console.WriteLine("Hello, World!");
    }
}

Hope this helps :innocent:

7 Likes

Very concise, can help a lot of curious new programmers that wonder what the differences are, the code blocks help a lot to see the differences on the actual coding part.

1 Like

c++ is for sure the best tho

2 Likes