With respect to various file streams and modes, answer the following questions a. What is the difference between ios::ate and ios::app? b. ios::trunc is similar to ios:out. State true or false. Justify c. Explain the syntax of seekg function with example?

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 12RQ
icon
Related questions
Question

With respect to various file streams and modes, answer the following questions
a. What is the difference between ios::ate and ios::app?
b. ios::trunc is similar to ios:out. State true or false. Justify
c. Explain the syntax of seekg function with example?
d. Write the meaning of following syntax
fstream myFile("test.txt", ios::in | ios::out | ios::trunc);
e. State if the below code will execute or not? State the reasons
ofstream outfile;
outfile.open(“name1.txt”);
outfile.open(“name2.txt”);
outfile.close();

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT