蒲公英110

2016年8月21日

const的全面理解

摘要: const关键字用来作甚?const是一个类型修饰符。常见的类型修饰符有哪些? short long unsigned signed static autoextern register 定义一个变量。 (1)类型描述符中如果有多个关键字,他们出现的位置不影响对变量的限制。 short int i; 阅读全文

posted @ 2016-08-21 05:47 蒲公英110 阅读(738) 评论(0) 推荐(0) 编辑

static关键字的理解

摘要: #include<stdio.h> int counter(int i){ static int count=0;//编译时只运行一次 count=count+i; return count; } main() { int i,j; for(i=0;i<5;i++) { j=counter(i); 阅读全文

posted @ 2016-08-21 05:00 蒲公英110 阅读(505) 评论(0) 推荐(0) 编辑

导航