there's not any major advantage in learning pure C unless you know for a fact you'll be working in a career that forbids C++ for some reason, usually a huge older C codebase with no plan for rework. you'll learn all of C while learning C++. the only thing you won't learn is some C-only ways of doing things that are the original ways of doing things before C++ STL, such as gnu data structures, heavier dependence on raw malloc calls, etc. and this is coming from a lifelong C programmer and C professor. learn C++. it's fine to start with C if you want, but transition into classes and templates and STL quickly unless this is literally your first language, which is seems it's not. Answer from eruciform on reddit.com
🌐
Princeton
competitive-programming.cs.princeton.edu › resources
Princeton Competitive Programming
Some links have multiple ratings when they are suited to different levels. You can use most languages for competitive programming (like Java, C++, Python, even OCaml!), but the most popular language is C++. Here we include some resources for people that want to learn C++.
🌐
Quora
quora.com › Can-I-use-the-C-programming-language-for-competitive-programming
Can I use the C programming language for competitive programming? - Quora
Answer (1 of 8): Yes, you can use C in competitive programming like many other languages. It depends on the online judge that you are giving the competition to, but most of the judges support C, in my opinion.
Discussions

Which is better to use for competitive programming, C or C++?
there's not any major advantage in learning pure C unless you know for a fact you'll be working in a career that forbids C++ for some reason, usually a huge older C codebase with no plan for rework. you'll learn all of C while learning C++. the only thing you won't learn is some C-only ways of doing things that are the original ways of doing things before C++ STL, such as gnu data structures, heavier dependence on raw malloc calls, etc. and this is coming from a lifelong C programmer and C professor. learn C++. it's fine to start with C if you want, but transition into classes and templates and STL quickly unless this is literally your first language, which is seems it's not. More on reddit.com
🌐 r/learnprogramming
7
1
October 8, 2021
C++ Competitive Programming YouTube Channel
I actually quite like the idea of your channel. That being I think you still have much too learn :-) First of all I think you should set up a github where you post your solutions, to make them easier accessible. My second point is - stop using macros! Please don't use them at all. There are lots of valid use cases for macros, but #define FORI(s,n) for(int i = s; i < n; ++i) is among the worst kind of macro usage (imho). If you use macros for stuff like this, I first have to learn your user defined macro language in order to understand your code. Besides readability there are tons of other arguments against macros (e.g. conflicting names when you include other files, potentially longer compile times, ...). My third point is that you should really stop using using namespace std; See also https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice I furthermore think you could also show solutions which are using the std algorithms (as an alternative): int numJewelsInStone(const std::string& J, const std::string& S) { const std::unordered_set jewels(begin(J), end(J)); return std::count_if(begin(S), end(S), [&jewels](const char& c) { return jewels.find(c) != end(jewels); }); } EDIT: changed to count to count_if More on reddit.com
🌐 r/cpp
9
6
January 30, 2018
C++ in Competitive Programming: string basics
Very entertaining - one tiny quibble: The latter point is referred as the Small String Optimization and it means that short strings (generally 15/22 chars) do not go to the heap, but instead they get allocated on the stack This isn't quite true. In the SSO, short strings are stored in the std::string itself and don't require a separate allocation. However, the std::string might live on the stack or it might live in the heap, depending on how it was allocated. More on reddit.com
🌐 r/cpp
31
55
June 5, 2016
Vim and C++: For competitive programming
Vim with the right configuration is definitely the way to go for C and C++ in my opinion. In addition to cscope and YouCompleteMe, also learn about Vim's ctags integration which allows you to instantly jump to a definition under the cursor of a user defined type, variable, function name etc. Also, vim-dispatch is an easy way to build projects from Vim and works well with tmux. Tagslist is a nice plugin which opens a window that lists functions, classes, global vars etc. defined in the current buffer. More on reddit.com
🌐 r/vim
15
16
March 16, 2016
🌐
GeeksforGeeks
geeksforgeeks.org › gblog › how-to-begin-with-competitive-programming
How to begin with Competitive Programming? - GeeksforGeeks
July 23, 2025 - Input and output format specifications must be read carefully. For example, most of the problems expect a new line after every output. So if we don't write printf("\n") or equivalent statement in a loop that runs for all test cases, the program would be rejected.
🌐
USACO Guide
usaco.guide › home › general › introduction to competitive programming
Introduction to Competitive Programming · USACO Guide
In general, each problem in competitive programming is solved with a two-step process: coming up with the algorithm, which involves problem solving skills and intuition · implementing the algorithm, which requires programming skills to translate the algorithm into working code. For each problem, you submit the completed code to a grader, which checks the answers calculated by your program against a set of predetermined test cases.
🌐
GeeksforGeeks
geeksforgeeks.org › dsa › competitive-programming-a-complete-guide
Competitive Programming - A Complete Guide - GeeksforGeeks
2 weeks ago - Learning Opportunity: In Competitive programming, we get a wide range of variety of problems and various arithmetic concepts. Competitive programming exposes various data structures and algorithms which help us better understand the complexity of problems. What is Competitive Programming and How to Prepare for It? Competitive Programming (CP) Handbook with Complete Roadmap
🌐
Reddit
reddit.com › r/learnprogramming › which is better to use for competitive programming, c or c++?
r/learnprogramming on Reddit: Which is better to use for competitive programming, C or C++?
October 8, 2021 -

C and C++ are among the most popular languages for CPs and I'd like to learn one of them. Which one do you think is more suitable and better to use?

I only need it for CP. I'm not a beginner in programming, I'd say I'm intermediate in Python and JS. But since those 2 languages don't have some features that exist in C and C++ (pointer, memory management, etc), I would need take more time to learn about them, so I'd also prefer the language that could teach me those concepts easier.

🌐
Educative
educative.io › blog › guide-competitive-programming-cpp
What is competitive programming? Competitive programming with C++
In this course, you will learn to prepare for competitive programming contests like ACM ICPC, Google CodeJam, Facebook HackerCup, and many more. Each topic is broken down with a healthy mix of theory, code samples, step-by-step solved sample ...
Find elsewhere
🌐
HackerEarth
hackerearth.com › practice › notes › kaushik.mv3 › learn-to-code-by-competitive-programming
Learn to Code by Competitive Programming | HackerEarth
Get comfortable writing code in either of one of these languages C, C++ or Java. Why only C, C++ or Java? Because these are the standard languages allowed in any programming competition.
🌐
TutorialsPoint
tutorialspoint.com › writing-c-cplusplus-code-efficiently-in-competitive-programming
Writing C/C++ code efficiently in Competitive programming
In competitive programming, the most important thing is an effective code. Optimized and faster code is important and can make a difference in the ranks of the programmer. To write an effective c/c++ code in competitive programming, here are
🌐
GeeksforGeeks
geeksforgeeks.org › writing-cc-code-efficiently-in-competitive-programming
Writing C/C++ code efficiently in Competitive programming - GeeksforGeeks
September 12, 2023 - Try to learn different functions ... of time and words. ... Competitive Programming is a mental sport that enables you to code a given problem under provided constraints....
🌐
Codedamn
codedamn.com › news › c programming
How should C/C++ be coded in competitive programming?
January 1, 2023 - The answer is both. C++ is a good choice for competitive programming because it has a lot of features that make the code more efficient and stable. However, C is also a good choice because it is easier to learn than C++, and it is more widely ...
🌐
Codeforces
codeforces.com › blog › entry › 23054
An awesome list for competitive programming! - Codeforces
Therefore, in my opinion it would probably be cool if there's an awesome list for competitive programming! ( It's now featured on the main list! ) I'm actively updating the list here: https://github.com/lnishan/awesome-competitive-programming · A curated list of awesome Competitive Programming, Algorithm and Data Structure resources.
🌐
Codedamn
codedamn.com › news › developer tips
Complete guide to using C++ for competitive programming
October 3, 2022 - Now let’s see why most developers choose c++ for competitive programming. When you compete in contests, time limits come into play. Every second can give the highest or the lowest ranks, so time plays an important role in competitive programming. That’s why c++ is most preferred.
🌐
CodeChef
codechef.com › getting-started
CodeChef: Practical coding for everyone
October 23, 2021 - Learn to code for free using our beginner friendly and interactive learning courses. Get all the practical skills required to excel at computer science. Start learning with CodeChef today and unlock your potential as a developer!
🌐
GeeksforGeeks
geeksforgeeks.org › c++ › c-tricks-competitive-programming-c-11
C++ tricks for competitive programming (for C++ 11) - GeeksforGeeks
July 23, 2025 - In this post, some more tricks are discussed. Writing C/C++ code efficiently in Competitive programming Although, practice is the only way that ensures increased performance in programming contests but having some tricks up your sleeve ensures an upper edge and fast debugging.
🌐
HackerEarth
hackerearth.com › practice › notes › getting-started-with-the-sport-of-programming
Getting started with the sport of competitive programming - Triveni Mahatha
This document is to guide those ... with competitive programming. Originally, this document was prepared during the summers of 2014 to help the freshers of Indian Institute of Technology, Kanpur. So, we thought it might be useful to others as well. Prerequisite : Basics of any programming language. We will follow C/C...
🌐
Competitive Programming Algorithms
cp-algorithms.com › index.html
Main Page - Algorithms for Competitive Programming
October, 15, 2024: GitHub pages based mirror is now served at https://gh.cp-algorithms.com/, and an auxiliary competitive programming library is available at https://lib.cp-algorithms.com/. July 16, 2024: Major overhaul of the Finding strongly connected components / Building condensation graph article. June 26, 2023: Added automatic RSS feeds for new articles and updates in articles.
🌐
DEV Community
dev.to › educative › introductory-guide-to-competitive-programming-with-c-81c
Introductory Guide to Competitive Programming with C++ - DEV Community
June 18, 2020 - This is especially difficult because competitors are required to develop programs in a limited time frame. The most common programming languages for competitive programming are Java and C++ due to their relative run-time efficiency compared to other languages like Python or JavaScript.
🌐
Cses
cses.fi › book › book.pdf pdf
Competitive Programmer’s Handbook Antti Laaksonen Draft July 3, 2018
traditional software engineering, the programs are short (usually at most a few · hundred lines of code), and they do not need to be maintained after the contest. ... C++, Python and Java. For example, in Google Code Jam 2017, among the best · 3,000 participants, 79 % used C++, 16 % used Python and 8 % used Java [29]. Some participants also used several languages. Many people think that C++ is the best choice for a competitive programmer,