Which function is used to get the position of the file pointer in a file?
- getpos()
- seekg()
- tellg()
- seekp()
The "tellg()" function in C++ is used to get the current position of the file pointer in a file when working with input operations. It returns the current position of the reading cursor within the file, which is useful for various file handling tasks.
Loading...
Related Quiz
- What is the potential problem with the following loop: while(true) { /* code */ }?
- The keyword _______ is used to grant a function or class access to the private and protected members of another class in C++.
- The _______ keyword is used when we want to explicitly pass by reference but prevent the function from modifying the argument.
- You are building a configuration parser for a C++ application...
- Unlike if-else, switch-case in C++ does not support _______ type for case values.