C is a mid-level language because it is interpreted by a compiler, which turns it into machine (low-level) code.
Low-level code is basically the 1s and 0s of binary language. The closer you get to writing actual 1s and 0s to specific memory locations, the "lower" the level of your language.
The problem is that it is impossible to write the millions of 1s and 0s most programs need by hand, and it would be too difficult to do even if you were smart enough to do it.
That's why you have a mid-level language such as C.
C allows you to write simple phrases and expressions, and the compiler will turn that into 1s and 0s for you.
A high-level language would be the ability to type in something such as "Print out all the possible 5-card poker hands in a 52-card deck." The computer would understand your request and simply produce a result.
However, the problem with a high-level language is that it requires semantics -- the computer has to understand all the words and what they mean. That's hard even for humans to do, nonetheless a computer, which can't easily tell the difference between statements such as "I love my wife" and "I love to swim." To a computer, "love" means the same thing in both sentences; to people, it means different things.
So, most programming languages shoot the middle between actually requiring you to write 1s and 0s and letting you simply ask for something. C is an example; it has certain constructs and methodologies that make taking complex ideas, such as giving all the possible 5-card poker hands in a single deck, as simple as writing several for loops and if statements.
Why say c language is a middle level language iwant example for proove it?
in c programming you can working directly with memory and system resource !,but this is old idea for dos programming
in Windows you can working with system resource with win api function in Delphi, vb , c# and more
c language compiler isn't check for type compatible and memory garbage collection for this reason c compile and execute fast but is not reliable
in pascal you can see a hard type checking pascal programs is very reliably and usually system isn't carash !
however you can use low level program in c and pascal see
void main (void
{
byte a, b ;
a= 10;
b=15;
asm{
mov ah,a
mov bh,b
int 10
}
return ;
}
this is low programming in c , in turbo pascal you can write this code .
90 % of UNIX and Linux operating system programmed by c language
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment