tellp() function in C++28 Aug 2024 | 2 min read Introduction:The tellp() function returns the pointer's current "put" position in the stream when used with output streams. It has no parameters and returns a value of the member type pos_type, an integer data type that represents the put stream pointer's current position. Syntax:Return -If successful, the current output position indication; otherwise, return -1. Example:1Output: the current position of pointer is :10 Explanation: In the code above, the tellp() function returns the current position in the file to which it points. Example 2 -Output: this is a sample Explanation: In this case, the tellp() method returns the position of the pointer. After that, the pointer is shifted back from the current place by 7 positions using the seekp() function, and the content is then inserted there. Next TopicMatrix addition in C++ |
C++ Programs
Tutorial Compiler Programs OOPs STL Interview Questions | C++ Programming Examples C++ programs are frequently asked in the interview. These programs can be asked from basics, array, string, pointer, linked list,...
2 min read
conj() function in C++
The is present in the standard library. C++ provides a wide range of inbuilt functions for complex numbers. It is also a built-in function that deals with complex numbers. This function is provided by the <comple> header file. The main intention of this function is...
3 min read
Elo Rating Algorithm in C++
In this article, we will discuss the with it's approach and implementation. One popular rating method for ranking players in a variety of competitive games is the Elo Rating method. A player who has a higher ELO rating than another is more likely to ail in a...
4 min read
Basic C++ Commands
"Basic C++ commands" refers to the syntax and basic instructions of the C++ programming language, which is used extensively in creating a wide variety of software applications. Object-oriented programming (OOP) is one of the new features that C++ brings to the C programming language. Fundamentally, C++...
6 min read
Boyer Moore Algorithm for Pattern Searching in C++
Pattern recognition is an important problem in the field of computer science. Pattern searching methods display the search results when we search for a string in a notepad/word document, browser, or database. The following is an example of a problem statement: Given a string text[0..n-1] and a...
4 min read
Difference between C++ and Go Languages
In this article, we will discuss the difference between C++ and GO. But before discussing their differences, we must know about C++ and Go with their examples and uses. What is the C++ programming language? C++ is a high-level and general-purpose programming language that was created as an...
4 min read
Cerr in C++
Various streams are available in the C++ standard library for handling input and output activities. One of these streams is called cerr, which is short for "standard error". Cerr is made specifically for error messages and diagnostics, unlike the cout stream, which is used for general...
3 min read
Program for Centered Icosahedral Number in C++
Introduction A computational tool called "" was put together to determine the centered icosahedral numbers from user-defined input. The vertices of an icosahedron, a polyhedron with twenty equilateral triangular faces, are the beginning of the sequence formed by these numbers. Centered icosahedral numbers are important in mathematics...
5 min read
What is runtime type information
? Runtime type information (RTTI), also known as runtime type identification (RTI), is a feature of several programming languages (such as C++, Object Pascal, and Ada) that makes data about an object's data type available at runtime. It is possible for runtime type information to be made...
4 min read
Add two Numbers Represented by Linked Lists in C++
The below code is an implementation of adding two numbers represented as linked lists in C++. In this implementation, the input linked lists are assumed to represent the numbers in reverse order, i.e., the least significant digit is at the head of the list. The implementation...
4 min read
We request you to subscribe our newsletter for upcoming updates.

We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India