c 之路
文章平均质量分 78
user_define_race
这个作者很懒,什么都没留下…
展开
-
动态内存
//堆区//程序员来管理的堆//内存自己分配//很大,自由分配 //最大可以到内存的80% 以上//栈区//一块是系统内存分配自动管理的就是栈//栈区很小//数组在栈区。int a[1024*1024*1024] ;//栈溢出 stack overflowsystem("pause");#include #include原创 2015-01-06 21:06:32 · 400 阅读 · 0 评论 -
高级指针的运算
字符串#include #include void main8(){ char* str="tasklist"; //将字符串常量tasklist 的地址,传给str printf("\n%d,%d",sizeof(str),sizeof("tasklist"));//\0 9个字节 system(str);//system 根据字符串地址,或者字符串 ge原创 2015-01-08 23:08:54 · 353 阅读 · 0 评论 -
字符串 指针二维数组
#include #include #define _CRT_SECURE_NO_WARNINGS#include void main1(){ char str[50]; char str1[20]; char str2[20]; gets(str1);//获取字符串初始化 scanf("%s",str2);//获取字符串初始化 printf("%s,原创 2015-01-11 18:44:51 · 562 阅读 · 0 评论 -
数组
include #include #define N 20//定义常量void main(){ //int a[10];//数组越界不报错 ////因为数组外部的内存控件,不确定是否有权限 ////如果越界访问,程序会崩溃 //for(int i=0;i<16;i++) //{ // a[i]=i+1; //} int b[N];// 只原创 2014-12-28 21:08:29 · 358 阅读 · 0 评论 -
指针
基本操作 #define _CRT_SECURE_NO_WARNINGS#include #include #include int add(int a,int b){ return a+b;}void main(){ int num=100; int *p=#//p 是一个指针变量,存储的是num地址 int (*pp)(int a,int b);//定义函原创 2015-01-01 18:48:29 · 310 阅读 · 0 评论 -
高级指针
函数的外挂靶子程序#include #include #include void msg(){ MessageBoxA(0,"open","hello world",0);}int add(int a,int b){ system("tasklist"); return a+b;}void main(){ int numA=100; int numB=200原创 2015-01-05 00:02:34 · 325 阅读 · 0 评论