Hi,
Sorry for putting a c code.
I am trying to use memset. But it is behaving in a strange manner.
The out put is giving hello blank space and some junk at the end.Code:int main() { char arr[99]; char tt[] = "hello"; memcpy(arr,tt,5); memset(arr+5,' ',94); printf("%s",arr); return 0; }
But as per my knowledge it should only print hello.
I am using vs2005.
Please clarify




Reply With Quote