C++ Modulus Operator (%) — Complete Guide with Examples & Edge Cases
The C++ modulus operator (%) returns the remainder of a division. This guide covers everything — negative numbers, fmod() for decimals, real use cases, and the pitfalls to avoid.
The C++ modulus operator (%) returns the remainder of a division. This guide covers everything — negative numbers, fmod() for decimals, real use cases, and the pitfalls to avoid.
This tutorial is designed to give a working knowledge of C++ (and indirectly parts of C) as quickly as possible for people with Java programming experience and familiarity with basic programming language concepts. By working through the exercises, core C++ concepts can be learned and practiced.
Kruskal’s algorithm builds a minimum spanning tree by sorting edges and rejecting cycles with union-find. Tested C, C++, and Python code included.
Want to learn to code? Want to learn C++? Struggling to follow your lecturer or books and tutorials written for experts? You’re not alone. As a professional C++ developer and former Harvard teaching fellow, I know what you need to know to be a great C++ programmer, and I know how to teach it, one step at a time. I know where people struggle, and why, and how to make it clear.
Archived on 1 June 2026, read-only, 797 issues frozen. It still compiles clean on GCC and fails outright on current MSVC. Here is what to do about it.
Nine free C and C++ resources, checked for whether they are actually free, actually maintained, and actually teaching modern C++.
There are always few little known or hidden features in each programming language. At StackOverflow.com someone started a series of posts “Hidden features of” programming languages. The Hidden Features series is great for people who are new to a certain language.
I have compiled a list of repeatedly asking C++ interview questions here. Some of them are very important C++ questions
AMD’s Framewave (FW) is a free and open-source collection of image and signal processing routines to accelerate application development, debugging,
This article presents some of the currently available options for open source C/C++ matrix libraries employable within a Linux environment.
Fifty places to find C and C++ source code, grouped by purpose: language reference, real production projects, curated libraries, and graded practice.
Every programming language was created to solve a problem. This is the history behind the major languages — who invented C, Python, Java, Rust and more, when, and why.