??? 09/28/04 10:19 Read: times |
#78245 - RE: Keil strncpy function doubt????? Responding to: ???'s previous message |
hi,
If I am not mistaken both the functions should have similar output. No. You mixed it with memcpy() strncpy(volume_disp,counted_pulses,6); Well, it may copy upto 6 chars if the null-terminator is not detected early. If it is detected then result will be different. How different depends on function realization. Some compilers just stop to copy rest bytes after 0x00, another compilers fill rest area of destiantion with 0x00. Regards, Oleg |