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
find area uder the curve y=f(x) between x=a and x=b

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Friend function in c++: class miles; class km  {    float value;    public :   // void input();     km convert(km  ,int a ) ;    void output()    {

Write a ‘C’ program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.

Write a program that takes the image tracks.jpg and finds Canny edges, and then finds lines in these edges using the Hough transform. The easiest way to do this is to take the prog

Write a C program to compute the factorial of  5 i.e. 1x2x3x4x5 etc Write a C program to calculate the output Y for a given value of X for the following formula.       Y=X 2


Define Advantages of Multi File Program? The main merits of spreading a program across several files are: • Teams of programmers able to work on programs. Every programmer w

What are control structures? - Control structures decide which instructions in program must be executed. - This implies that program flow may not necessarily move from one s

algorithm to find out all the factors of given positive integers