Tutorials
Courses
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
21.3K+ articles
C++
4.3K+ articles
Strings
3.0K+ articles
Amazon
1.8K+ articles
STL
1.3K+ articles
Stack
418+ articles
CPP-Library
254+ articles
cpp-string
157+ articles
cpp-stack
79+ articles
cpp-stringstream
12 posts
Recent Articles
Popular Articles
Reverse individual words
Last Updated: 17 March 2025
Given string str, we need to print the reverse of individual words.Examples: Input: Hello WorldOutput: olleH dlroWExplanation: Each word in "Hello World" is reversed indiv...
read more
Strings
Stack
DSA
Amazon
STL
cpp-string
cpp-stack
cpp-stringstream
Find the first repeated word in a string
Last Updated: 20 December 2023
Given a string, Find the 1st repeated word in a string.Examples:Input: "Ravi had been saying that he had been there"Output: hadInput: "Ravi had been saying that"Output: No...
read more
Strings
DSA
Amazon
Goldman Sachs
cpp-unordered_map
cpp-stringstream
StringStream in C++ for Decimal to Hexadecimal and back
Last Updated: 14 February 2023
Stringstream is stream class present in C++ which is used for doing operations on a string. It can be used for formatting/parsing/converting a string to number/char etc. H...
read more
C++
cpp-input-output
cpp-string
base-conversion
cpp-stringstream
stringstream in C++ and its Applications
Last Updated: 11 January 2025
A stringstream associates a string object with a stream allowing you to read from the string as if it were a stream (like cin). To use stringstream, we need to include sst...
read more
C++
cpp-string
cpp-stringstream
Tokenizing a string in C++
Last Updated: 11 January 2025
Tokenizing a string denotes splitting a string with respect to some delimiter(s). There are many ways to tokenize a string. In this article four of them are explained:Usin...
read more
C++
cpp-string
cpp-stringstream
tellg() function in C++ with example
Last Updated: 05 June 2018
The tellg() function is used with input streams, and returns the current "get" position of the pointer in the stream. It has no parameters and returns a value of the membe...
read more
Misc
C++ Programs
C++
cpp-stringstream
Find the missing value from the given equation a + b = c
Last Updated: 01 September 2022
Given an equation of the form:a + b = cOut of which any one of the termsa,borcis missing. The task is to find the missing term.Examples:Input: 2 + 6 = ?Output: 8Input: ? +...
read more
Strings
Mathematical
Competitive Programming
DSA
cpp-stringstream
How to Iterate through a String word by word in C++
Last Updated: 15 June 2022
Given a String comprising of many words separated by space, the task is to iterate over these words of the string in C++.Example:Input: str = "GeeksforGeeks is a computer ...
read more
C++
cpp-string
cpp-stringstream
Convert String to int in C++
Last Updated: 01 July 2025
In C++, both string and int are not in the same object hierarchy, we cannot perform implicit or explicit type casting as we can do in case of double to int or float to int...
read more
C++
CPP-Library
cpp-string
cpp-stringstream
Converting Number to String in C++
Last Updated: 11 January 2025
In C++, converting integers to strings or converting numbers to strings or vice-versa is actually a big paradigm shift in itself. In general or more specifically in compet...
read more
C++
CPP-Library
cpp-string
cpp-stringstream
Program to extract words from a given String
Last Updated: 18 April 2023
The task is to extract words from a given string. There may be one or more space between words.Examples:Input : geeks for geeksOutput : geeks for geeksInpu...
read more
Strings
DSA
cpp-string
cpp-stringstream
How to Use stringstream for Input With Spaces in C++?
Last Updated: 06 July 2024
In C++, thestd::stringstreamclass is a stream class to operate on strings and is very useful when we want to operate on a string as if it were a stream (like cin or cout)....
read more
C++ Programs
C++
Picked
cpp-input-output
cpp-stringstream
CPP Examples
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 !