Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

File I/O: Strings 1. Create string str initialized to alphabet 2. Create a FILE pointer MyTxt 3. Open file message.txt for text write 4. Write

image text in transcribed

image text in transcribed

File I/O: Strings 1. Create string str initialized to alphabet 2. Create a FILE pointer MyTxt 3. Open file "message.txt" for text write 4. Write string to file 5. Close the file 6. Open file for text read 7. Read string from file 8. Rewind to start of file 9. Read 5 characters from file 10. Position to letter j' in file 11. Read 5 characters starting at 'j' in file en rite Illustration 4 L? 41) In Illustration 4-1 What statement would create a string called str initialized to lower case alphabet? A) char strl] "abcdefghijklmnopqrstuvwxyz"; C) char* str[] "abcdefghij klmnopqrstuvwxyz". = 42) In Illustration 4-2 What statement would create a file pointer MyTxt? A) MyTxt FILE FILE MyTxt; MyTxt* 43) In Illustration 4-3 What statement would open the file "message.txt" to write text with MyTxt? tfopen("message tx (e MyTxt = fopen( "message.txt", "w"); MyTxt fopen("W"message.txt" MyTxt D) fopen ("message.txt"); = 44)In Illustration 4-4 What statement would put str into "message.txt" file? A) fputs (MyTxt) B) fwrite(str, MyTxt); D) fputs(str, MyTxt)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions

Question

DEFINE wrongful dismissal and constructive dismissal.

Answered: 1 week ago