重温static函数
来源:互联网 发布:网络泰迪含义 编辑:程序博客网 时间:2024/05/23 18:34
static在不同的位置结果不尽相同
#include<stdio.h>
int main()
{
int i=0;
for(;i<10;i++)
{
static int num=10;
printf("%d ",++num);
}
return 0;
}
输出的结果为 11 12 13 14 15 16 17 18 19 20
#include<stdio.h>
int main()
{
int i=0;
static int num=10;
for(;i<10;i++)
{
num=10;
printf("%d ",++num);
}
return 0;
}
输出的结果为11 11 11 11 11 11 11 11 11 11 11
0 0
- 重温static函数
- 重温static 关键字,温故而知新
- 重温C++ primer 之C++类中的static数据成员,static成员函数
- 重温java(static关键字)
- 重温函数模板
- 【数据结构重温】散列函数
- 重温SQL Server(SQL函数)
- 重温python基础3:函数
- 重温
- static变量; static函数
- static变量 static函数
- C++基础重温之二:C和C++中的static
- 重温面向对象OOP——static关键字
- static 函数
- static函数
- static函数
- 函数,static
- static 函数
- Android四大控件之ContentProvider
- windows核心编程之并行、并发、同步、异步
- sqlite关闭数据库连接
- 数据结构实验之图论六:村村通公路
- 水题——优先队列
- 重温static函数
- Android DEX安全攻防战
- CentOS 7 源码编译安装MySQL数据库
- 车牌识别
- MFC下CSocket编程详解
- 欢迎使用CSDN-markdown编辑器
- unity 集成 RenderDoc 调试shader的方法
- Android TV磁贴类app自动化框架二次改造(基于UiAutomator)
- static学习