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
In this program, you are going to write a program for playing the game of Hangman. In this game, the computer will pick a word and display a sequence of blanks to be filled in; one

DATA TRANSMISSION: When we talk on the telephone we generally transmit a message to someone else. The message is made up of words that we speak into the telephone instrument.

Question 1 Write short note on                             1) NFS 2) CIFS Question 2 What is Virtual Application? Write down the benefits and drawbacks of it Questi

Internet searching algorithm: Searching: When a user enters a query into a search engine, the engine examines its index and provides a listing of best-matching web pages accordin

Question: Imagine that you are part of a design team creating a new mobile phone for people such as "Angel White" whose persona is given below: Angel is turning 90 years old

You can also allocate a single value to several variables at the same time. For instance: X=y=z =1 Now, an integer object is generated with the value 1, and all three variables are

draw the logic diagram of 2*4 decoder in only NOR gate .include enable inputs .

Question: Using a questionnaire is a popular way commonly used to evaluate interfaces. (a) Describe advantages of using questionnaires as a means to evaluate interfaces.

Hill Climbing - artificial intelligence: As we've seen, in some particular problems, searching the search path from primly to goal state is the point of the exercise. In anothe

explain the steps to form a colourful card