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
They transfer the process flow, provisionally or totally, to a destiny, replicating this action until the counter is zero. LOOP LOOPE LOOPNE LOOP INSTRUCTION reason: To produce a c

Question 1 What is an operating system? Explain its functions Question 2 Discuss round-robin scheduling Question 3 Discuss on segmentation Question 4 What are the s

The divisions which make a macro are: • Declaration of the macro Code of the macro Macro termination directive The assertion of the macro is done the following way: Name Macro [par

Indexing a page on internet: Once, the spiders have completed the task of finding information about Web pages, the search engine must store the information in such way that yo

One dimensional array:  A one-dimensional array  is a structured collection of elements  that can be accessed individually by specifying the position of a component with  ind

to do a assignment regarding IPC in linux

To make a program in assembler two choices exist, the earliest one is to use the TASM or Turbo Assembler, of Borland, and the next one is to use the debugger, generally we use this

flowchart that display yhe students average scores for 3 quizzes.Assume that there are 3 sections having 5 student each.Valid number is 1-100 for the quizzes.Enter an invalid numbe

Question 1 Describe HSV and CMYK color models Question 2 Describe gamma and its importance Question 3 What are the steps involved in image manipulation? Que

akrenda club has just opened their jym and pools services. They need a system that can keep record of total sales of each. The club has silver and gold members. The silver members