Sunday, August 8, 2010

BASICS OF C PROGRAMMING

0 comments



                        The C program language is a popular and widely used programming language for creating computer programs.If you are interested in becoming a programmer,i will help you .I will teach you to read and write C program.I  explained the basic features of C program for beginners which should help you to understand how does a C program work.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!.


Execution of C program


 Here we will discuss about the execution of C program  step by step.


step1:The line int main() declares the main function.Every C program must have a function named main somewhere in the code.At run time,program execution start at the first line of the main function.In C,the { and } symbols mark beginning and end of a block of code.The line int a,b,c; created three variables(created three memory locations with a address).It help us to store data







step2:Here,the first prompt displayed to the user by using printf statement.The printf statement in C allows you to send output to standard out(for us,the screen).





step3:If you enter a data.It is stored into the memory location "a"."&a" means write  data into the location"a".






step4:Here,the second prompt displayed to the user.






step5:And the second data stored into the second memory location "b".






step6:Here,we will used a formula c=a+b; (the value of a+b is stored into "c")






step7:The line "5+4=9" is formed and displayed to the user.








Home Next>>



Leave a Reply