Tuesday, 7 February 2012

9

Do some research or reference to be specific on what is C language to be more understand. Most of the reference were taken from internet (Google) only. C is use for system program or program that can be compile into integrated circuit.


C is often used for "system programming", including implementing operating systems and embedded system applications, due to a combination of desirable characteristics such as code portability and efficiency, ability to access specific hardware addresses, ability to pun types to match externally imposed data access requirements, and low run-time demand on system resources. C can also be used for website programming using CGI as a "gateway" for information between the Web application, the server, and the browser. Some reasons for choosing C over interpreted languages are its speed, stability, and near-universal availability. [taken from Wikipedia]
Syntax in C language
C has a formal grammar specified by the C standard. [taken from Wikipedia]
C source files contain declarations and function definitions. Function definitions, in turn, contain declarations and statements. Declarations either define new types using keywords such as struct,union, and enum, or assign types to and perhaps reserve storage for new variables, usually by writing the type followed by the variable name. Keywords such as char and int specify built-in types. Sections of code are enclosed in braces ({ and }, sometimes called "curly brackets") to limit the scope of declarations and to act as a single statement for control structures. The most common statement is an expression statement, consisting of an expression to be evaluated, followed by a semicolon; as a side effect of the evaluation, functions may be called and variables may be assigned new values. To modify the normal sequential execution of statements, C provides several control-flow statements identified by reserved keywords. Structured programming is supported by if(-else) conditional execution and by do-whilewhile, and for iterative execution (looping). The for statement has separate initialization, testing, and re-initialization expressions, any or all of which can be omitted. break and continue can be used to leave the innermost enclosing loop statement or skip to its re-initialization. There is also a non-structured goto statement which branches directly to the designated label within the function. switch selects a case to be executed based on the value of an integer expression. Expressions can use a variety of built-in operators and may contain function calls. [taken from Wikipedia]

No comments: