How C Programming Works


(heba) #1

This is very useful link illustrate

C Programming

How C Programming Works

by Marshall Brain

http://computer.howstuffworks.com/c.htm



(heba) #2

[left]Alslamu Alikom wa rhmtoh allah wa braktoh

Attached with this message c programmig language book
Author:Ritchie Kernighan - 2nd Edition [/left]


(Eng.Amr) #3

شكرا على الكتاب القيم


(heba) #4

How C Programming Works
[SIZE=5]

[/size][LEFT]by Marshall Brain

The C programming language is a popular and widely used programming language for creating computer programs. Programmers around the world embrace C because it gives maximum control and efficiency to the programmer. If you are a programmer, or if you are interested in becoming a programmer, there are a couple of benefits you gain from learning C:

[ul]
[li]

You will be able to read and write code for a large number of platforms – everything from microcontrollers to the most advanced scientific systems can be written in C, and many modern operating systems are written in C.
[/li][li]
The jump to the object oriented C++ language becomes much easier. C++ is an extension of C, and it is nearly impossible to learn C++ without learning C first.
[/li][/ul]

This animation shows the execution of a simple C program. By the end of this article you will understand how it works!

In this article, we will walk through the entire language and show you how to become a C programmer, starting at the beginning. You will be amazed at all of the different things you can create once you know C!

What is C?

[SIZE=5]

C is a computer programming language. That means that you can use C to create lists of instructions for a computer to follow. C is one of thousands of programming languages currently in use. C has been around for several decades and has won widespread acceptance because it gives programmers maximum control and efficiency. C is an easy language to learn. It is a bit more cryptic in its style than some other languages, but you get beyond that fairly quickly.
[/size]


[/left]
[LEFT]


C is what is called a compiled language. This means that once you write your C program, you must run it through a C compiler to turn your program into an executable that the computer can run (execute). The C program is the human-readable form, while the executable that comes out of the compiler is the machine-readable and executable form. What this means is that to write and run a C program, you must have access to a C compiler. If you are using a UNIX machine (for example, if you are writing CGI scripts in C on your host’s UNIX computer, or if you are a student working on a lab’s UNIX machine), the C compiler is available for free. It is called either “cc” or “gcc” and is available on the command line. If you are a student, then the school will likely provide you with a compiler – find out what the school is using and learn about it. If you are working at home on a Windows machine, you are going to need to download a free C compiler or purchase a commercial compiler. A widely used commercial compiler is Microsoft’s Visual C++ environment (it compiles both C and C++ programs). Unfortunately, this program costs several hundred dollars. If you do not have hundreds of dollars to spend on a commercial compiler, then you can use one of the free compilers available on the Web. See http://computer.howstuffworks.com/framed.htm?parent=c.htm&url=http://delorie.com/djgpp/ as a starting point in your search. We will start at the beginning with an extremely simple C program and build up from there. I will assume that you are using the UNIX command line and gcc as your environment for these examples; if you are not, all of the code will still work fine – you will simply need to understand and use whatever compiler you have available. Let’s get started!

****
you can complete this illustarion through this website

http://computer.howstuffworks.com/c.htm
[/left]


(system) #5

الف شكر على الموقع الهاي ده بجد موقع جامد وانا ان شاء الله هحاول استفيد منه على قد ما اقدر
هو انا ملاحط ان الناس كلها شغاله C++وناسيه السى خالص
مع ان السى هى البدايه
وفرحت جدا لما شوفت المووضوع ده

(system) #6

that is super , thanks for the illustration
anyways , i started studying c programming since one week and they fas a first step to study c programming they gave us the PSD chart but so far i cant work on i mean i cannot come up with and idea as if i face a question like :

Given are some numbers. The numbers are not all different an d the ssries is finished by the number 1000.
Determine the largest of these numbers and count also how often this maximum occurres.
Print both results.

Hint: At the start some variables have to be created
Also a while loop and some decision blocks will be nescessary
[SIZE=5]we need to work by hard and think about how to answer this question by hand by using PSD( program structure Diagram)

is it possible in anyway that i get any help in this case ?[/size]


(zeyad2007) #7

شكرا جزيلا