This is really not true at all.
A modern C compiler does quite a lot of interesting work to try to make C code competitive.
Things are reordered and elided and optimized in ways that are often surprising.
Consider what this does in C.
while (1);
If you think it requires the program to loop forever, you are mistaken. :)
Beyond that, there is a great deal that C cannot do which assembly can.
C has no concept of registers (the register storage class just makes a variable unaddressable).
C has no concept of op codes.
C has no concept of the CPUs memory model -- C has a segmented memory model.
C programs run in the C Abstract Machine, and understanding this is essential to writing C programs that do not work only by accident.
Consider the following snippet -- what do you expect it to do in C?
{ int i = 1; printf("%d, %d\n", i++, i); }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is really not true at all.
A modern C compiler does quite a lot of interesting work to try to make C code competitive.
Things are reordered and elided and optimized in ways that are often surprising.
Consider what this does in C.
If you think it requires the program to loop forever, you are mistaken. :)
Beyond that, there is a great deal that C cannot do which assembly can.
C has no concept of registers (the register storage class just makes a variable unaddressable).
C has no concept of op codes.
C has no concept of the CPUs memory model -- C has a segmented memory model.
C programs run in the C Abstract Machine, and understanding this is essential to writing C programs that do not work only by accident.
Consider the following snippet -- what do you expect it to do in C?