123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|467|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> C/C++/C#/Other -> C++ Class, week 9

Mon, 30 Nov 2009, 10:58
Afr0
This week (last week, actually) of the official Socoder C++ class has been about using streams and files.

Challenges

1. Create a program to write the following two lines of text to a file called 'Question1.txt';

'Programming is fun.
I love programming'

2. What method can you use to test whether a file has reached its end? What method can you use to test whether a file has an error? What method can you use to test whether a file has reached its end and has an error?

3. What is the result when the letter 'A' is bit-shifted to the left three places (<<3)? What is the result when the letter 'A' is bit-shifted to the right two places (>>2)?

4. Explain why the encryption program needs to be run a second time in order to decrypt the file placed into the program.

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!