#include <fstream> using namespace std; int main () { long pos; ofstream outfile; outfile.open ("test.txt"); outfile.write ("This is an apple",16); pos = outfile.tellp(); outfile.seekp (pos - 7); outfile.write (" sam", 4); outfile.close(); return 0; }
a) This is an apple
b) apple
c) sample
d) This is a sample
What is the output of this C++ program in the “test.txt” file?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What is the output of this C++ program in the “test.txt” file?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!