Wolverine
BAN USERAnother approach could be to do the following:
1. Have 2 pointers - begin and end.
2. Set begin to the start of the long text.
3. Advance end L units. Check to see if end is now a blank space. If not, move back end until a blank space is encountered.
4. Print all characters from begin to end. Print new line character.
5. Do end++; begin = end;
6. Repeat steps 1-6 until end hits the end of the long text.
Returning error code needs the calling function to check for the return value. This adds another if condition to the calling code - which needs additional test case. Also the onus is on the calling code. if the calling code forgets to check for the value, then a error returned would be missed.
Exceptions don't need the immediate calling function to catch the exception. The catch could be anywhere up the call stack. If there is none, the system catches the exception and terminates the program. Error conditions don't get missed using exceptions.
First a DNS lookup is performed which gets the IP address of the server. The client then requests a connection on port 80 of that IP address. Once the connection is established, the client makes a request of the URL page. The server responds to the client. The browser then formats the data received and displays the webpage.
- Wolverine September 23, 2011
Binary representation of 0.1 = 000110001100011.... (Loss of precision)
- Wolverine November 16, 2011Binary representation of 0.125 = 001 (can be represented accurately)