Hello my code goes like this:
Please let me know if sprintf changes the memory address of pszLogStr or only does a string copy on it so that I can free it later.Code:char* pszLogStr = NULL; pszLogStr = (char *)calloc(100,sizeof(char)); if (pszLogStr == NULL) { return(1); } sprintf(pszLogStr,"Looks might be deceiving : %d",007); free(pszLogStr);
Thanks.