Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking at the basic strcpy function. It is

char *strcpy( char *dest, const char *src );

Which reminds me of assembly language: MOV DEST, SRC

share|improve this question
You just need to ask yourself which came first C or Intel *86 chips. Or put it another way processors exist to run programs on, any new processor is going to attempt to efficiently support all features of an existing popular language. – James Anderson Feb 21 '12 at 3:15
@James - That's a very good point; Thank You So Much! – Adel Feb 21 '12 at 3:19
strcpy(dest, src) or dest = src. No, in C, these don't accomplish the exact same thing, but the general pattern (destination before source) is the same in both. If C had used a syntax like TI-BASIC's value → variable (source before destination) for assignment, maybe it would have been strcpy(src, dest) too. – Michael Kjörling Feb 21 '12 at 9:11
@James Anderson: The Intel 8008 was released in 1972, and that set the tone for the Intel processors to follow (8080, 8085, 8086 and beyond), and that's about the time C was released. Looks like independent development to me. – David Thornley Feb 21 '12 at 16:16
@David -- but Cs predecessors such as BCPL had already been around for a while. Besides nearly every contemporary instruction set (PDP-11, IBM 360, Unisys, Burroughs etc.) implemented a block move instruction. – James Anderson Feb 22 '12 at 1:26
up vote 6 down vote accepted

The Intel processors were not yet invented when the C library was designed, so no.

Your observation that C is similar to assembly language is correct, however. C was designed to replace assembly when Unix needed to be ported to other architectures than the original PDP-11 and many constructs map directly to the PDP-11 machine language.

I do not know if the machine language of the PDP-11 was similar to Intel (dest, src) or the reason for the API convention was just that it was this way that made most sense to the designer.

See for time line.

share|improve this answer
Thank You Very Much, this is very helpful! – Adel Feb 21 '12 at 3:18
Yes, at least with the usual DEC assemblers (e.g., Macro-11), you'd also use mov dst, src. – Jerry Coffin Feb 21 '12 at 4:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.