How often will the statement be executed?  How likely is it that the
literal will change?   How often do you miscount?

-----Original Message-----
From: John McKown [mailto:snip] 
Sent: Monday, September 08, 2008 11:25 AM
To: [email protected]
Subject: question for C experts - strcpy vs memcpy

If I am copying literal text into a char array, which do you think is
better:

strcpy(dest,"LITERAL");

OR

memcpy(dest,"LITERAL",8);

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to