arrays and strings, Basic Computer Science

Assignment Help:
This is a C file.
1. The program starts by printing your name with an end sign ">". For example, "NAME >";
2. Then, you can type in a string. If the string is not "vi xxx", you print "I don''t know this command." You keep getting a string until you get a string starting with "vi". For example, "vi myp.c". You program will then open "myp.c" for reading. If the file does not exist, then there is nothing to read.
3. Read the file into a fixed array of "mytext[1000][ 81]". Presumably, the "myp.c" text file is not too large with each line 80 characters or fewer. If there are more characters than 80 in a line, you can just ignore the characters beyond 80.
4. Close your file.
5. Change all your texts to upper case, and display the first 20 lines on your screen.
6. Then, your program will wait for a command from the keyboard.
7. If you type ":w", your program will open the same file for writing, and write your array of text into that file.
8. If you type ":q!", your program will quite.
9. If your type ":w myp1.c", your program will open "myp1.c" and write into that file. You should always close your file after finish. Remember to use function calls instead of a program of one function.
Each function should be shorter than two pages.

Related Discussions:- arrays and strings

Cai, #whatis cai?and its pit fallsquestion..

#whatis cai?and its pit fallsquestion..

What is Router. Explain Network Router, A router is a device which has play...

A router is a device which has played an important role in the development and existence of the Internet. Routers are designed to transmit data from other network users to specific

College management system project, E-R diagram and details for college mana...

E-R diagram and details for college management system

Give birth to new life forms, Give birth to new life forms A research ...

Give birth to new life forms A research of Artificial Life will definitely throw light on what it means for a complex application to be 'alive'. Moreover, ALife researchers th

Computer architecture, Consider a CPU that implements two parallel fetch-ex...

Consider a CPU that implements two parallel fetch-execute pipelines for superscalar processing. Show the performance improvement over scalar pipeline processing and no-pipeline pro

Micro-computer, explain the function of each block in the block diagram of ...

explain the function of each block in the block diagram of micro-computer

Outdoor patient department features - receptionist module, Outdoor Patient...

Outdoor Patient Department (OPD) Features The following modules can be developed for various areas and workers. A receptionist Module Receptionist updates all bas

Database management help, Suppose that you are writing a stored procedure t...

Suppose that you are writing a stored procedure to record new purchases. Suppose that you know that while your procedure is running, another stored procedure that records shipment

Fourth generation of computers, THE FOURTH GENERATION (1975 ONWARDS) ...

THE FOURTH GENERATION (1975 ONWARDS) This generation of computers have one or more of the following characteristics:     Semi-conductor memory instead of core memo

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd