7 like 1 dislike

 Consider the code below:

fstream myFile("abc.txt", ios::out); 
if(myFile) myFile << "abc.txt"; 
myFile.close();
myFile.open("abc.txt", ios::in); 
char text[20]; 
if(myFile) myFile >> text; 
cout << text; 

What will happen, if abc.txt already has content "abc.txt"?

asked in File processing by (11.8k points) | 20 views

32 Answers

0 like 0 dislike
Hidden content!
* *
answered by (1.4k points)
0 like 0 dislike
Hidden content!
** *
answered by (-228 points)
0 like 0 dislike
Hidden content!
*
answered by (-335 points)
0 like 0 dislike
Hidden content!
* **
answered by (-144 points)
0 0
Did not notice this...
0 like 0 dislike
Hidden content!
* to ** text * ** * * **
answered by (-144 points)
0 like 0 dislike
Hidden content!
*
answered by (-103 points)
0 like 0 dislike
Hidden content!
*
answered by (-97 points)
0 like 0 dislike
Hidden content!
* * **
answered by (323 points)
0 like 0 dislike
Hidden content!
to ** text * ** *** *** * *
answered by (323 points)
0 like 0 dislike
Hidden content!
*
answered by (-95 points)
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:162.158.78.202
©2016-2018

Related questions

7 like 1 dislike
25 answers
asked Jun 15, 2016 in File processing by thopd (11.8k points) | 17 views
8 like 1 dislike
44 answers
asked Jun 15, 2016 in File processing by thopd (11.8k points) | 14 views
7 like 0 dislike
47 answers
asked Jun 15, 2016 in File processing by thopd (11.8k points) | 19 views
6 like 2 dislike
42 answers
asked May 24, 2016 in Templates by thopd (11.8k points) | 23 views
2,974 questions
57,433 answers
29,089 comments
938 users