Friday, 10 February 2012
Thursday, 9 February 2012
Wednesday, 8 February 2012
10
C language also have own syntax,keywords and arithmetic symbols that can be use. These characteristics might be apply into the software for this project.
Character set
The basic C source character set includes the following characters:
- Letters:
a–z,A–Z,_- Digits:
0–9- Punctuation:
~ ! @ # % ^ & * ( ) - + = : ; " ' < > , . ? | / \ { } [ ]- Whitespace: space, horizontal tab, vertical tab, form feed, newline
Newline indicates the end of a text line; it need not correspond to an actual single character, although for convenience C treats it as one.Additional multibyte encoded characters may be used, but are not portable. The latest C standard (C11) allows multinational Unicode characters to be embedded portably within C source text by using a\uDDDDencoding (whereDDDDdenotes a Unicode character code), although this feature is not yet widely implemented.The basic C execution character set contains the same characters, along with representations for alert, backspace, and carriage return. Run-time support for extended character sets has increased with each revision of the C standard.
Keywords
C89 has 32 keywords (reserved words with special meaning):
C99 adds five more keywords:
breakcasecharconstcontinuedefaultdo
elseenumexternfloatforgotoif
longregisterreturnshortsignedsizeofstatic
switchtypedefunionunsignedvoidvolatilewhile
C11 adds seven more keywords:
_Bool_Complex_Imaginary
inlinerestrict
_Alignas_Alignof_Atomic_Generic
_Noreturn_Static_assert_Thread_local
Operators
Main article: Operators in C and C++C supports a rich set of operators, which are symbols used within an expression to specify the manipulations to be performed while evaluating that expression. C has operators for:
- assignment
:=
- augmented assignment
:+=,-=,*=,/=,%=,&=,|=,^=,<<=,>>=
- bitwise logic
:~,&,|,^
- bitwise shifts
:<<,>>
- boolean logic
:!,&&,||
- calling functions
:( )
- increment and decrement
:++and--
- member selection
:.,->
- object size:
sizeof
- order relations
:<,<=,>,>=
- reference and dereference
:&,*,[ ]
- sequencing:
,
- subexpression grouping
:( )
- type conversion
:(typename)
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 asstruct,union, andenum, or assign types to and perhaps reserve storage for new variables, usually by writing the type followed by the variable name. Keywords such ascharandintspecify 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 byif(-else) conditional execution and bydo-while,while, andforiterative execution (looping). Theforstatement has separate initialization, testing, and re-initialization expressions, any or all of which can be omitted.breakandcontinuecan be used to leave the innermost enclosing loop statement or skip to its re-initialization. There is also a non-structuredgotostatement which branches directly to the designated label within the function.switchselects acaseto 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]




