c c语言培训内容,C语言培训资料.doc

一、项目的开发过程

方案设计

设计软硬件仕样书

编码

调试

二、C语言基础

C语言的一个基本结构

#define TRUE 1

#define FALSE 0

#define SIZE 200

/*

#define xxx xxx Preprocessor directive

*/

void printf ( char* , int ) ;

void putchar ( char ) ;

/*xxx xxxx ( xxx , xxx ) Function prototype declarator (7) */

char mark [ SIZE + 1 ] ;

/* char xxx Type declarator (1) */

/* External definition (5) */

main ( )

{

int i , prime , k , count ; int xxx /* Type declarator (1) */

count = 0 ; xx = xx /* Operator (2) */

for ( i = 0 ; i <= SIZE ; i ++ ) /* for ( xx ; xx ; xx ) xxx ; Control structure (3) */

mark [ i ] = TRUE ;

for ( i = 0 ; i <= SIZE ; i ++ ) {

if ( mark [ i ] ) {

prime = i + i + 3 ; /*xxx = xxx + xxx + xxx Operator (2) */

printf ( " %6d " , prime ) ; /*xxx ( xxx ) ; Operator (2) */

count ++ ;

if ( ( count%8 ) == 0 ) putchar ( ' \n ' ) ; /*if ( xxx ) xxx ; Control structure (3) */

for ( k = i + prime ; k <= SIZE ; k += prime )

mark [ k ] = FALSE ;

}

}

printf ( " \n%d primes found. " , count ) ; /* xxx ( xxx ) ; Operator (2) */

}

void printf ( char *s , int i )

{

int j ;

char *ss ;

j = i ;

ss = s ;

}

void putchar ( char c )

{

char d ;

d = c ;

}

C语言的优缺点

便于移植

加快开发速度

代码效率不高

C语言的关键字

1)标准C关键字

auto break case char const continue default

do double else enum extern for float

goto if int long register return short

signed sizeof static struct switch typedef union

unsigned void volatile while

2)NEC C语言扩展关键字

_ _callt/callt ................................. Declaration of callt function

_ _callf/callf ................................. Declaration of callf function

_ _sreg/sreg...................................... Declaration of sreg variable

noauto .................................................. Declaration of noauto function

函数不通过堆栈传递参数,它通过寄存器或者fee4-fee7传递参数,临时变量也放在这个区域

_ _leaf/norec ................................... Declaration of norec function

自身不调用其他函数,它不通过堆栈传参数,它通过寄存器或者fee8-feef传递参数

临时变量放入fef0-fef7

bit........................................................

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值