answersLogoWhite

0

C and C++ normally compile to machine code - code that the processor can run natively.

Their run time environment is effectively the computer - they see the computer as if they were running alone, but the kernel* looks after interaction with the hardware to ensure that different programs do not try to access the same memory (unless specifically requested), etc at the same time.

* in modern operating systems, eg *nix, the kernel separates out each program into a separate "virtual"** machine which prevents them interacting with the "virtual" machine of another program. In much older systems the processor didn't have the memory protection and so the programs had to play nicely with each other, but a bug could mean that a program could splat over another's memory and crash that program, and possibly the whole machine

** "virtual" is used in the basic sense that the program thinks it has the whole machine, unlike the more sophisticated virtual machines (today) which can be used to host a whole operating system, or emulate a different computer (and processor).

User Avatar

Wiki User

7y ago

What else can I help you with?