Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Mathematical
7.8K+ articles
C++
4.3K+ articles
Strings
3.3K+ articles
C++ Programs
2.4K+ articles
Sorting
1.8K+ articles
Computer Science Fundamentals
1.5K+ articles
Stack
436+ articles
cpp-string
157+ articles
CPP Strings Programs
12 posts
Recent Articles
Popular Articles
C++ Program to Perform Calculations in Pure Strings
Last Updated: 16 November 2022
Given a string of operations containing three operands for each operation "type of command", "first operand", and "second operand". Calculate all the commands given in thi...
read more
C++ Programs
C++
CPP Strings Programs
Convert Float to String In C++
Last Updated: 27 November 2022
In this article, we learn how we can convert float to string in C++ using different methods:Using the to_string()Using stringstreamUsing MacrosUsing lexical_cast from the ...
read more
Technical Scripter
C++ Programs
C++
Picked
Technical Scripter 2022
CPP Strings Programs
How to Print String Literal and Qstring With Qdebug in C++?
Last Updated: 28 April 2025
Printing string literals and QString with QDebug in C++ can be a useful tool for debugging. By printing out the contents of a string or QString, you can quickly identify a...
read more
Technical Scripter
C++
Picked
Technical Scripter 2022
CPP Strings Programs
Remove Leading Zeros From String in C++
Last Updated: 14 September 2022
Given a string of digits, remove leading zeros from it.Examples:Input : 00000123569Output : 123569Input : 000012356090Output : 12356090In this article, we will use two str...
read more
C++
cpp-string
CPP Strings Programs
C++ Program To Find Length Of The Longest Substring Without Repeating Characters
Last Updated: 19 April 2023
Given a string str, find the length of the longest substring without repeating characters.For “ABDEFGABEF”, the longest substring are “BDEFGA” and "DEFGAB", with length 6....
read more
Strings
C++ Programs
DSA
CPP Strings Programs
C++ Program To Add Two Binary Strings
Last Updated: 17 January 2023
Given two binary strings, return their sum (also a binary string).Example:Input: a = "11", b = "1"Output: "100" We strongly recommend you to minimize your browser and try...
read more
Strings
Mathematical
C++ Programs
C++
DSA
CPP Strings Programs
C++ Program to Replace a Character in a String
Last Updated: 11 April 2023
Given a string S, c1 and c2. Replace character c1 with c2 and c2 with c1.Examples:Input: grrksfoegrrks, c1 = e, c2 = r Output: geeksforgeeks Input: ratul, c1 =...
read more
Strings
C++ Programs
C++
Computer Science Fundamentals
DSA
CPP Strings Programs
C++ Program to Reverse a String Using Stack
Last Updated: 18 December 2023
Given a string, reverse it using stack. For example "GeeksQuiz" should be converted to "ziuQskeeG".Following is simple algorithm to reverse a string using stack.1) Create ...
read more
Strings
Stack
C++ Programs
C++
DSA
CPP Strings Programs
C++ Program to Print the First Letter of Each Word of a String
Last Updated: 07 March 2024
String str is given which contains lowercase English letters and spaces. It may contain multiple spaces. Get the first letter of every word and return the result as a stri...
read more
Strings
C++ Programs
C++
Computer Science Fundamentals
DSA
CPP Strings Programs
C++ Program to Split a String Into a Number of Sub-Strings
Last Updated: 27 January 2023
Splitting a string by some delimiter is a very common task. For example, we have a comma-separated list of items from a file and we want individual items in an array.Almos...
read more
C++ Programs
C++
CPP Strings Programs
C++ Program to Sort String of Characters
Last Updated: 16 October 2024
Sorting a string means rearranging the characters of the given string in some defined order such as alphabetical order. In this article, we will learn how to sort a string...
read more
Strings
Sorting
Hash
C++ Programs
C++
DSA
CPP Strings Programs
CPP-DSA
C++ Program To Print Reverse of a String Using Recursion
Last Updated: 17 January 2023
Write a recursive function to print the reverse of a given string. Code: C++ // C++ program to reverse a string using recursion #include bits/stdc++.husing name...
read more
C++ Programs
C++
CPP Strings Programs
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !