English
Language : 

CC78K0S Datasheet, PDF (75/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 5 OPERATORS AND EXPRESSIONS
This chapter describes the operators and expressions to be used in the C language.
C has an abundance of operators for arithmetic, logical, and other operations. This rich set of operators also
includes those for bit and address operations.
An expression is a string or combination of an operator and one or more operands. The operator defines the
action to be performed on the operand(s) such as computation of a value, instructions on an object or function,
generation of side effects, or a combination of these.
Examples of operators are given below.
#define TRUE 1
#define FALSE 0
#define SIZE 200
void lprintf(char*, int);
void putchar(char c);
char mark[SIZE+1];
+ ............................................................. Arithmetic operator
void main(void){
int i,prime,k,count;
count=0;
for(i=0;i<=SIZE;i++)
mark[i]=TRUE;
= .............................................................
++ ...........................................................
<= ...........................................................
Assignment operator
Postfix operator
Relational operator
for(i=0;i<=SIZE;i++){
if(mark[i]){
prime=i+i+3;
+ ............................................ Arithmetic operator
lprintf("%d",prime);
count++;
++ .......................................... Postfix operator
if((count%8)==0)
== .......................................... Relational operator
putchar('\n');
for(k=i+prime;k<=SIZE;k+=prime)
+=.................... Assignment operator
mark[k]=FALSE;
}
}
User’s Manual U14872EJ1V0UM
75