arrays and strings, Basic Computer Science

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.
Posted Date: 2/25/2013 7:05:42 PM | Location : United States







Related Discussions:- arrays and strings, Assignment Help, Ask Question on arrays and strings, Get Answer, Expert's Help, arrays and strings Discussions

Write discussion on arrays and strings
Your posts are moderated
Related Questions
1. What is Evaluating Information System Investments? 2. Is IS evaluation different to evaluation of other investments? 3. What approaches are used to evaluate IS investments

How to make an assignment entitled "Decision Making: Forecasting" and I am required to make a pseudocode and flowchart based on the task.

Consider the state transition diagram of Figure 3.9b. Suppose that it is time for the OS to dispatch a process and that there are processes in both the Ready state and the Ready/Su

Consider the one-time pad encryption scheme to encrypt a 1-bit message m, and assume m is chosen with uniform distribution from message space M={0,1}. Let E1 be the event "message

function of arithmetic logic unit

A car battery is of 12 V. Eight dry cells of 1.5 V each connected in series can give 12 V. But such cells are not used in starting a car. Why?

1. (40 points) Add a course drop method to the system that you implemented in Problem Set 1. Modularize your new implementation properly. For any new methods that you introduce: 1.

Reflex agent-Artificial Intelligence If an agent decides and executes an action in response to a sensor input without consultation of its world, then it may be considered a ref

Desktop computer: Desktop computer is popularly known as personal computer (PC). As the name suggest, it is generally small in size and fitted on the top of a desk which can b

suggest 5 ways by which new products and services can be developed using management information system