Java (2877)
Python (730)
Go (587)
JavaScript (451)
C++ (337)
C (312)
Fashion (100)
Ancient History (95)
CSS (92)
HTML (73)
Linux (72)
Public Speaking (68)
Economics (67)
History (66)
Modern History (66)
English Spoken (61)
Sociology (59)
Personal Development (58)
PHP (58)
Technology (57)
Ancient Bihar (56)
Web Development (51)
Software Testing (48)
Android (47)
MySQL (47)
Node.js (47)
Hosting (46)
National Day (46)
React (46)
Email (45)
International Day (45)
AWS (44)
English Grammar (44)
Elasticsearch (43)
Git (43)
Bhakti (42)
Bihar (42)
Blockchain (42)
SQL (42)
Introductory Sociology (32)
Microeconomics (28)
Interview Questions (17)
Social Institutions (14)
मांग और आपूर्ति (13)
Macroeconomics (7)
CodeIgniter (6)
Indian Economy (6)
Medieval History (5)
Laravel (4)
Accessibility (3)
Next.js (1)
Social Processes and Social Change (1)
  1. Home>>
  2. Topics>>
  3. C++
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌

Best Division

Spread Your Knowledge

  • All topics
  • About us
  • Contact us
  • Privacy policy
  • Terms of service
  • Copyright
  • Facebook
  • Twitter
  • Instagram
  • Youtube
  • LinkedIn
  • Pinterest
  • Github
  • Tumblr

© 2026 Best Division

C++

337 posts about C++: questions with answers, tutorials and articles, newest first.

C++Question
C++Linux

How do you use Valgrind and AddressSanitizer to find memory bugs?

AddressSanitizer and Valgrind find leaks, overflows and use after free in C++ programs. See the commands, sample reports and when to use each tool.

Jayant KumarJayant Kumar
Nov 30, 2026
C++Question
C++

What is a buffer overflow in C++ and how do you prevent it?

A buffer overflow in C++ is an out-of-bounds read or write that corrupts memory. See what causes it and how safe types, bounds checks and tools prevent it.

Jayant KumarJayant Kumar
Nov 30, 2026
C++Question
C++

What is a dangling pointer in C++ and how do you avoid it?

A dangling pointer in C++ refers to an object that no longer exists. Learn the typical causes, safe ownership patterns and how to catch the bug with tools.

Jayant KumarJayant Kumar
Nov 30, 2026
C++Question
C++

What is a memory leak in C++ and how do you find one?

A memory leak in C++ is heap memory that can no longer be freed. See the usual causes, how to detect leaks with sanitizers, and how RAII prevents them.

Jayant KumarJayant Kumar
Nov 29, 2026
C++Question
C++

How do new[] and delete[] work for arrays in C++?

new[] allocates a heap array and delete[] destroys and frees it. See initialisation, internals, common bugs and modern replacements like std::vector.

Jayant KumarJayant Kumar
Nov 29, 2026
C++Question
C++

What is the One Definition Rule (ODR) in C++?

The One Definition Rule limits how often C++ entities may be defined. Learn the linker errors, the silent violations and how inline and templates stay legal.

Jayant KumarJayant Kumar
Nov 29, 2026
C++Question
C++

What is the C++ preprocessor and how do macros work?

The C++ preprocessor rewrites your source before compilation. Learn how macros work, why they bite, and which modern features replace them.

Jayant KumarJayant Kumar
Nov 28, 2026
C++Question
C++

How do you split a C++ program into header and source files?

Split a C++ program by putting declarations in headers and definitions in .cpp files. See a worked calculator example, build commands and common link errors.

Jayant KumarJayant Kumar
Nov 28, 2026
C++Question
C++

How do header files and include guards work in C++?

Header files share declarations between C++ source files, and include guards stop them being pasted twice. Learn #ifndef, #pragma once and common mistakes.

Jayant KumarJayant Kumar
Nov 28, 2026
C++Article
C++

What are storage classes in C++? extern, static, thread_local

Storage classes in C++ decide how long a variable lives and which files can see it. See static, extern, thread_local and mutable with examples.

Jayant KumarJayant Kumar
Nov 27, 2026
C++Question
C++

What is variable scope and lifetime in C++?

Understand where C++ names are visible and how long objects live, covering block scope, globals, static locals, shadowing and dangling pointers.

Jayant KumarJayant Kumar
Nov 27, 2026
C++Article
C++

What is recursion in C++? Examples and when to use it

Learn how recursion works in C++ with factorial, digit sum and Fibonacci examples, plus stack limits, memoisation and recursion versus loops.

Jayant KumarJayant Kumar
Nov 27, 2026
C++Article
C++

What is const correctness? Pointer to const vs const pointer in C++

Learn what const correctness means and how pointer to const differs from const pointer, with a reading rule, a table and runnable examples.

Jayant KumarJayant Kumar
Nov 26, 2026
C++Question
C++

How does pointer arithmetic work in C++?

Learn how adding and subtracting pointers moves by whole elements, how it relates to array indexing, and the bounds rules that keep it safe.

Jayant KumarJayant Kumar
Nov 26, 2026
C++Question
C++

What is the difference between pointers and references in C++?

Pointers can be null and rebound, references cannot. See the key differences with examples and learn which to choose in your own code.

Jayant KumarJayant Kumar
Nov 26, 2026
C++Question
C++

What is a pointer in C++ and how do you use it?

A beginner guide to pointers in C++: declaring, dereferencing, null pointers, arrays and dynamic memory, with small complete examples.

Jayant KumarJayant Kumar
Nov 25, 2026
C++Question
C++

What Are Default Arguments in C++ Functions?

Default arguments let callers omit trailing parameters in C++. See the syntax, rules, pitfalls with overloads and a modern options struct alternative.

Jayant KumarJayant Kumar
Nov 25, 2026
C++Question
C++

Pass by Value, Reference or Pointer in C++: What Is the Difference?

See how C++ passes arguments by value, reference and pointer, with runnable examples and simple rules for choosing the right parameter type.

Jayant KumarJayant Kumar
Nov 25, 2026
C++Question
C++

How Do You Define and Call a Function in C++?

Define functions with a return type, name and parameters, declare them before use, and call them with arguments, with overloading and modern features.

Jayant KumarJayant Kumar
Nov 24, 2026
C++Question
C++

What Is Undefined Behavior in C++ and How Do You Avoid It?

Undefined behavior lets a C++ program do anything. See the common causes, why optimisers make it worse, and the tools and habits that prevent it.

Jayant KumarJayant Kumar
Nov 24, 2026

Hmm... Want More

Please try with different query
Page 1Older posts →