-
How to be a C programmer - part 1
Hi Siva
ok so the following is for people who want to be C programmers. It's of course impossible to master C through a couple of threads in a forum but I hope that you'll get the basics and enough of a grasp to move on from here. I assume you know nothing at all of programming.
First a bit of theory. Not wanting to be boring but there are some nut and bolts you need to know to see the full picture. A computer program is a system and all systems have the following structure.
input ---> [ processing ( and possibly storage ) ] ---> output
Say, a calculator, you type in 2 + 2, that's the input. The calculator decides the answer is 4, that's the processing. The answer 4 is displayed on the screen, that's the output. Programs, whether simple or complicated, are all systems.
Systems can be made out of subsystems. All subsystems have the same structure (input, processing, output), it's just that one's output will be the other's input. Subsystems in a C program are called functions. Think of functions as bricks to build a house.
Computers only deal with 0 and 1. So theoretically you should open an editor and type in 0001110010... etc. That would not be practical. That's why we have computer languages like c. However a C program is text, not executable instructions, so a conversion will have to be done. The software doing the conversion is called a compiler. A compiler is itself a system.
text file containing C program ---> [ compiling ] ---> executable binary file
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks