String program, C/C++ Programming

Write a C++ program which does the following:

1. Asks the user to enter the following text "Four score and seven years ago there was a man named Joey Bagadonuts."

2. Save this string into a C string named inputSentence

3. Open a text file named lab7.txt as an output file

4. Write the C string inputSentence out to the file and also print it out to the screen.

5. Close the output file

6. Open the  lab7.txt file as an input file

7. Read the contents into a C string named outputSentence

8. Print the contents of the  C string outputSentence to the screen

9. Close the input file

10.  Print your name on the screen

11.  Take a screen shot and save it to a word document called lab7.doc

12.  EXIT the program

13.  Create a Zip file for your entire lab7 project and your word doc and put it into the dropbox for week 7

Posted Date: 2/21/2013 3:16:49 AM | Location : United States







Related Discussions:- String program, Assignment Help, Ask Question on String program, Get Answer, Expert's Help, String program Discussions

Write discussion on String program
Your posts are moderated
Related Questions

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Question 1 What are the different steps in executing a C program? Explain Question 2 What are the commonly used input/output functions in C? How are they accessed?

6999066263304447777077766622337778 -----> message sent by the first smuggler. my name is robert---------> message decoded by the second smuggler. Where ‘0’ denotes the "space".

Abstraction is of the process of hiding unwanted details from the user

Addition in a existing c++ unification algorithm Project Description: I have a existing code for a algorithm and need to add two modules into it, it is a unification algorith

C program to remove vowels in sentence : void main() {                 char  str[100];                 int n;                 printf("enter string\n");

Selecting Array Elements Implement the following C++ code in assembly language, using the block-structured .IF and .WHILE directives. Assume that all variables are 32-bit signed in

a) Define an Asset base class that provides the following method: class Asset { public:      virtual double getValue()=0; };   This will be the base class for both stock an

Write a program that writes your name on the monitor ten times. Write this program three times, once with each looping method.