Data Structure
Java
Python
HTML
Interview Preparation
Courses
Tutorials
Practice
Jobs
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
32.1K+ articles
DSA
20.0K+ articles
Python
19.6K+ articles
Experiences
15.8K+ articles
Interview Experiences
14.2K+ articles
C++
3.7K+ articles
Strings
2.1K+ articles
C++ Programs
1.5K+ articles
cpp-string
157+ articles
CPP-DSA
90+ articles
CPP Strings Programs
12 posts
Recent Articles
Popular Articles
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
C++ Program to Split a String Into a Number of Sub-Strings
Last Updated: 23 July 2025
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 Find Length Of The Longest Substring Without Repeating Characters
Last Updated: 23 July 2025
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 Sort String of Characters
Last Updated: 23 July 2025
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
C++
CPP Strings Programs
CPP-DSA
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
C++
CPP Strings Programs
C++ Program to Reverse a String Using Stack
Last Updated: 23 July 2025
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
C++
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
C++
CPP Strings Programs
C++ Program to Print the First Letter of Each Word of a String
Last Updated: 23 July 2025
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
C++
CPP Strings Programs
C++ Program To Print Reverse of a String Using Recursion
Last Updated: 23 July 2025
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
Convert Float to String In C++
Last Updated: 23 July 2025
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
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
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