Difference between revisions of "Hints for OOP344 Assignment 1"

From CDOT Wiki
Jump to: navigation, search
(Created page with 'OOP344 - 20113 ESCAPE KEY: #1- Allocate memory to size of strlen(str). #2-copy the content of str into allocated memory. #3- If ESCAPE is hit, copy the content of allocated mem…')
 
Line 3: Line 3:
 
ESCAPE KEY:
 
ESCAPE KEY:
  
#1- Allocate memory to size of strlen(str).
+
#- Allocate memory to size of strlen(str).
#2-copy the content of str into allocated memory.
+
#-copy the content of str into allocated memory.
#3- If ESCAPE is hit, copy the content of allocated memory back to str.
+
#- If ESCAPE is hit, copy the content of allocated memory back to str.
#4- Make sure before the function ends, deallocates the allocated memory.
+
#- Make sure before the function ends, deallocates the allocated memory.

Revision as of 15:59, 22 September 2011

OOP344 - 20113

ESCAPE KEY:

  1. - Allocate memory to size of strlen(str).
  2. -copy the content of str into allocated memory.
  3. - If ESCAPE is hit, copy the content of allocated memory back to str.
  4. - Make sure before the function ends, deallocates the allocated memory.