Suppose you want to read the file text.txt from the current working directory. Which one of the following statements correctly uses fopen function to open the file for reading? FILE* pFile; pFile = fopen("test.txt", "r" ); pFile = fopen( test.txt, r); pFile = fopen( test.txt, w); pFile = fopen("test.txt", "w" );

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.1: I/o File Stream Objects And Functions
Problem 3E
icon
Related questions
Question
Suppose you want to read the file text.txt from the current working directory.
Which one of the following statements correctly uses fopen function to open the file for
reading?
FILE* pFile;
pFile = fopen("test.txt", "r" );
pFile = fopen( test.txt, r);
pFile = fopen( test.txt, w);
pFile = fopen("test.txt", "w" );
Transcribed Image Text:Suppose you want to read the file text.txt from the current working directory. Which one of the following statements correctly uses fopen function to open the file for reading? FILE* pFile; pFile = fopen("test.txt", "r" ); pFile = fopen( test.txt, r); pFile = fopen( test.txt, w); pFile = fopen("test.txt", "w" );
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Files and Directory
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,