Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.4K+ articles
C++
3.8K+ articles
Strings
2.1K+ articles
Amazon
1.9K+ articles
STL
1.3K+ articles
Stack
261+ articles
CPP-Library
254+ articles
cpp-string
157+ articles
cpp-stack
79+ articles
cpp-stringstream
12 posts
Recent Articles
How to Use stringstream for Input With Spaces in C++?
Last Updated: 23 July 2025
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
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
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
DSA
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
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
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
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
stringstream in C++ and its Applications
Last Updated: 26 August 2025
A stringstream is a part of the C++ Standard Library, defined in the sstream header file. It allows us to read from and write to strings like they are streams.It lets us t...
read more
C++
cpp-string
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
Program to extract words from a given String
Last Updated: 23 July 2025
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
Converting Number to String in C++
Last Updated: 27 May 2026
In C++, converting numbers to strings is a very common task, especially while working with user input, file handling, and competitive programming problems. Sometimes we ne...
read more
C++
CPP-Library
cpp-string
cpp-stringstream
Convert String to int in C++
Last Updated: 23 May 2026
In C++, converting a string into an integer is a common operation used while handling user input, file data, and numeric processing. Since string and int are different dat...
read more
C++
CPP-Library
cpp-string
cpp-stringstream