I know that my questions are very simple but googleing them didn\'t get me any useful results... They\'r probably too simple!!
No. 1
char* createStr(
The first example allocates the string, then returns a pointer to it. When you do the assignment from the method's return value, you just assign the pointer. You only ever made one string.
In the second example, you want atoi.
atoi