C - Program StructureA C program basically has the following form:
Functions: are main building blocks of any C Program. Every C Program will have one or more functions and there is one mandatory function which is called main() function. This function is prefixed with keyword int which means this function returns an integer value when it exits. This integer value is retured using return statement. The C Programming language provides a set of built-in functions. In the above example printf() is a C built-in function which is used to print anything on the screen. CheckBuiltin function section for more detail. You will learn how to write your own functions and use them in Using Function session. Variables: are used to hold numbers, strings and complex data for manipulation. You will learn in detail about variables in C Variable Types. Statements & Expressions : Expressions combine variables and constants to create new values. Statements are expressions, assignments, function calls, or control flow statements which make up C programs. Comments: are used to give additional useful information inside a C Program. All the comments will be put inside /*...*/ as given in the example above. A comment can span through multiple lines. Note the followings
C Program CompilationTo compile a C program you would have to Compiler name and program files name. Assuming your compiler's name is cc and program file name is hello.c, give following command at Unix prompt.
|
Brife Detail And Information About The C/C++ Language Programming in any language .(All language allow)
Blog Archive
-
▼
2017
(16)
-
▼
April
(15)
- Introduction of c programming
- C - program structure
- History and use of c
- C - Reserved keywords
- C -Constant and variable
- C input /output
- C oprators
- TRUE BALANCE
- Examples of simple c programs
- example of cprogram(2)
- C Program to Compute Quotient and Remainder (example)
- C Program to Convert Binary Number to Decimal (exa...
- C Program to Find the Sum of Natural Numbers using...
- Learn C Programming
- Social community for computer programmer
-
▼
April
(15)
Thursday, 20 April 2017
C - program structure
Labels:
c,
c programming,
c structure,
program,
structure
Subscribe to:
Post Comments (Atom)
hey) nice discription on C basics! thanks!
ReplyDeleteI’d like to share my experience at this resource – an online course for beginners codeasy.net. There you learn just by reading an adventure story about fighting machines in the future. While reading, you meet challenges that require real coding to solve.
i could write code directly in browser, seems very useful)
Have anyone tried?