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
Write a program to sort an array of strings. Use new and delete operators. Write a program to find the factorial of a number using recursion. If we do not accept the number

# include stdio.h> # include string.h> # include conio.h> void main() {           int i=0,j=0,b=0,count=0;           int a[100];           for(i=0;i

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Operator overloading - c++ program: Write a program in c to define operator overloading. class matrix{                   private :                 int x[2][2];

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b


SquareMaze The SquareMaze class should be declared and defined in maze.h and maze.cpp, respectively. Each SquareMaze object will represent a randomly-generated square maze and its

THIS PROGRAM IS TO DISPLAY A STOCK CONTAINING ITEM CODE,ITEM NAME,PRICE AND ANOTHER STOCK WITH CODE & QUANTITY AND DISPLAY COMPLETE INFORMATION #include #include #include

compose a C program to solve the equation z2=(p1/Pg)+(v1^2/2g)+z1 p1=100kpa,v1=2m/s z1=3m P=1000kg/m^3 define g=9.81

string S convert it to a palindrome by doing chara, C/C++ Programming