C++ Programming Language

  • Last Updated :29 Aug, 2022

C++ is a general-purpose programming language and is widely used nowadays for competitive programming. It has imperative, object-oriented and generic programming features. C++ runs on lots of platforms like Windows, Linux, Unix, Mac etc.

C++ Recent Articles!
C++ Interview Questions

Basics, C vs C++, C++ vs Java, Input and Output, Operators, Arrays and Strings, Functions, References and Pointers, Dynamic memory allocation, Object Oriented Programming(OOP),Constructor and Destructor, Function Overloading, Operator Overloading, Virtual Functions, Exception Handling, Namespaces, Standard Template Library (STL), Inheritance, C++ Library, C++ Advanced, C++ in Competitive Programming, Puzzles, Interview Questions, Multiple Choice Questions


C vs C++

C++ vs Java

Input and output


Arrays and Strings


Pointers and References

Dynamic memory allocation

Object Oriented Programming(OOP)

Constructor and Destructor

Function Overloading

Operator Overloading

Virtual Functions

Exception Handling


Standard Template Library (STL)

  1. Introduction to STL
  2. Sorting
  3. Searching


  1. Pair (Practice)
  2. Vector (Practice)
  3. List
  4. Dequeue
  5. Deque::empty() and deque::size() in C++ STL
  6. Deque::pop_front() and deque::pop_back() in C++ STL
  7. Deque::clear() and deque::erase() in C++ STL
  8. Queue (Practice)
  9. Queue::front() and queue::back() in C++ STL
  10. Queue::push() and queue::pop() in C++ STL
  11. queue::empty() and queue::size() in C++ STL
  12. Priority Queue
  13. Stack (Practice)
  14. Stack::push() and stack::pop() in C++ STL
  15. Forward_list :: push_front() and forward_list :: pop_front() in C++ STL
  16. Stack::top() in C++ STL
  17. Stack::empty() and stack::size() in C++ STL
  18. Set (Practice)
  • Std::next_permutation and prev_permutation in C++
  • Std::stoul and std::stoull in C++
  • Shuffle vs random_shuffle in C++
  • Difference between set, multiset, unordered_set, unordered_multiset
  • Check if a key is present in a C++ map or unordered_map
  • Std::stable_partition in C++
  • Valarray slice selector
  • Std::memchr in C++
  • Std::strncmp() in C++
  • Stable_sort() in C++ STL
  • Std::memcmp() in C++
  • Std::memset in C++
  • Std::bucket_count and std::bucket_size in unordered_map in C++
  • Map of pairs in STL
  • Range-based for loop in C++
  • Std::includes() in C++ STL
  • Std::set_symmetric_difference in C++
  • Std::sort_heap in C++
  • Map vs unordered_map in C++
  • Round() in C++
  • Modulus of two float or double numbers
  • Multiset
  • Map (Practice)
  • Heap using STL C++
  • Multimap



    1. sort() in C++ STL
    2. Strand sort
    3. Type Inference in C++ (auto and decltype)
    4. transform() in C++ STL
    5. Variadic function templates in C++
    6. Template Specialization
    7. Implementing iterator pattern of a singly linked list
    8. Binary Search functions in C++ STL
    9. Descending order in Map and Multimap of C++ STL
    10. Insertion and Deletion in STL Set C++
    11. set::key_comp() in C++ STL
    12. set value_comp() function in C++ STL
    13. unordered_set get_allocator() in C++ STL with Examples


    C++ Library

    1. <random> file – generators and distributions
    2. Array type manipulation
    3. C++ programming and STL facts
    4. Sqrt, sqrtl and sqrtf in C++
    5. std::stod, std::stof, std::stold in C++
    6. C program to demonstrate fork() and pipe()
    7. Complex numbers in C++ | Set 1Set 2
    8. Inbuilt library functions for user Input
    9. Rename function in C/C++
    10. Chrono
    11. valarray class
    12. Floating Point Manipulation (fmod(), remainder(), remquo() … in cmath)(Practice)
    13. Character Classification: cctype
    14. Snprintf() in C library
    15. Boost::split in C++ library
    16. Modulus of two float or double numbers
    17. Is_trivial function in C++
    18. Array sum in C++ STL
    19. Div() function in C++
    20. Exit() vs _Exit() in C and C++
    21. Std::none_of in C++
    22. Isprint() in C++
    23. Iscntrl() in C++ and its application to find control characters
    24. Std::partition_point in C++
    25. Iterator Invalidation in C++
    26. Fesetround() and fegetround() in C++ and their application
    27. Rint(), rintf(), rintl() in C++
    28. Hypot(), hypotf(), hypotl() in C++
    29. Std::gslice | Valarray generalized slice selector
    30. std::setbase, std::setw , std::setfill in C++
    31. Strxfrm() in C/C++
    32. Set position with seekg() in C++ language file handling
    33. Strstr() in C/C++
    34. Difftime() C library function
    35. Socket Programming
    36. Precision of floating point numbers in C++ (floor(), ceil(), trunc(), round() and setprecision())
    37. <bit/stdc++.h> header file
    38. std::string class in C++
    39. Merge operations using STL in C++ (merge, includes, set_union, set_intersection, set_difference, ..)
    40. std::partition in C++ STL
    41. Ratio Manipulations in C++ | Set 1 (Arithmetic) , Set 2 (Comparison)
    42. numeric header in C++ STL | Set 1 (accumulate() and partial_sum()), Set 2 (adjacent_difference(), inner_product() and iota())
    43. Bind function and placeholders
    44. Array class
    45. Tuples
    46. Regex (Regular Expression)
    47. Common Subtleties in Vector STLs
    48. Understanding constexpr specifier
    49. unordered_multiset and its uses
    50. unordered_multimap and its application
    51. Populating a vector in C++ using fill() and fill_n()
    52. Writing OS Independent Code in C/C++
    53. C Program to display hostname and IP address
    54. Database Connectivity using C/C++
    55. C++ bitset and its application
    56. unordered_map in STL and its applications
    57. unorderd_set in STL and its applications
    58. nextafter() and nexttoward()

    C++ Advanced

    C++ in Competitive Programming


    Interview Questions

    Quick Links:

  • Recent Articles on C++
  • Practice Track on C++
  • C++ Output & Multiple Choice Questions
  • GeeksforGeeks Courses

    DSA Self Paced

    Learn Data Structures and Algorithms with DSA Self-Paced Course trusted by over 75,000 students! Prepare for SDE interviews of top companies such as Microsoft, Amazon, and Adobe, as well as other top product-based companies. Built with years of experience by industry experts and gives you a complete package of video lectures, practice problems, quizzes, discussion forums and contests, learn and master DSA at the best price possible with GeeksforGeeks. Start Today!

    Live Courses

    Get best-in-industry Interactive LIVE & Self-Paced Courses with Individual Attention by Leading Experts to upskill yourself and get into your dream company. Clear your doubts to the instructor just like an offline classroom program. Check out Valuable Live Courses by GeeksforGeeks to Encourage Out-of-the-box thinking, leading to Clarity in Concepts, Creativity and Innovative Ideas.- System Design Live, Competitive Programming Live, and more!

    Language Foundation Courses[C Programming / C++ / JAVA / Python ]

    GeeksforGeeks Language Foundation Courses – C Programming | Java Foundation | Python Foundation | C++ Foundation. – Learn any programming language from scratch and master all of its core principles for a strong programming foundation at the lowest price possible. These courses are for complete beginners who want to get started with programming and build their foundations.

    My Personal Notesarrow_drop_up

    Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.