Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. madprince

    StringCopy Help

    It did not get copied properly the function is char* cpy(char* old) { char* newer = (char*)malloc(sizeof(old)-1) ; int i = 0; while(old[i] != '\0') newer[ i ] = old[i++]; return newer; }
  2. madprince

    StringCopy Help

    I am new to C and want to know why this program adds garbage at the end of the string. #include <stdio.h> #include <stdlib.h> char* cpy(char*); int main() { char *old = &quot;Hello All Now i thought this would work apparently&quot;; char *newer = cpy(old); printf(&quot;%s&quot;,newer)...

Part and Inventory Search

Back
Top