std::list

Is C Programming Still Relevant Today?

Yes, C is still widely used in operating systems, embedded devices and tools. Here is what that means for C++ learners and whether C is worth studying.

On this page
  1. Where C is still used
  2. Why C++ learners still benefit
  3. How C and C++ differ
  4. Is C worth learning alongside C++?
  5. Key points

Yes. C is still widely used, and it is unlikely to disappear soon. It remains the language of many operating system kernels, device drivers and small embedded devices. For someone learning C++, C is still worth understanding, mainly because C++ grew out of it and many real codebases use both languages.

Where C is still used

  • Operating systems. The Linux kernel is written mostly in C.
  • Embedded systems. Many microcontrollers in appliances, sensors and vehicles run firmware written in C.
  • Libraries and tools. Many other languages call into C libraries through a C interface. The reference implementation of Python, for example, is written in C.

Why C++ learners still benefit

C++ began as an extension of C, and much of its core syntax carries over. Types, pointers, arrays, loops and the preprocessor look familiar in both languages. If you have seen C, older code becomes easier to read, and you can see why C++ features such as std::string and std::vector exist. They were designed to handle, safely and conveniently, work that C programmers often do by hand with character arrays and manual memory management.

Here is the same hello world program in each language. The C version:

#include <stdio.h>

int main(void) {
    printf("Hello, world\n");
    return 0;
}

The C++ version:

#include <iostream>

int main() {
    std::cout << "Hello, world\n";
}

The C version uses printf from <stdio.h>. The C++ version uses std::cout from <iostream>. Both print the same text.

How C and C++ differ

C is a smaller language. It does not have classes, templates, references, namespaces or the standard containers that C++ provides. C++ adds those features and more, so most of the extra learning when moving from C to C++ happens in those areas.

Is C worth learning alongside C++?

It depends on your goals. If you want to build application software in C++, a deep study of C is optional. If you are interested in operating systems, embedded work or maintaining older code, C is a strong next step.

Questions about whether a language still has a future often come up alongside this one, such as “Is C++ a dying language?”

Key points

  • C is still used in operating systems, embedded devices and many libraries.
  • C++ grew out of C, so knowing C helps when you read older code.
  • Whether C is worth your time depends on the work you want to do.

The complete guide to std::list

std::list in C++
Read the guide

Keep exploring

Guides from other topics

All topics →

Unary Operators in C++

Learn what unary operators in C++ are, from the one-operand symbols like !, ~, ++ and * to prefix vs postfix, precedence and common mistakes, with examples.