码迷,mamicode.com
首页 >  
搜索关键字:le ge lt gt eq ne    ( 256714个结果
编程题:使用指向指针的指针
编程题:使用指向指针的指针#include<stdio.h>voidmain(){staticchar*str[]={"How","are","you"};char**p;p=str+1;printf("%s\n",*p);printf("%c\n",**p);}
分类:其他好文   时间:2014-05-21 02:51:56    阅读次数:277
编程题:展示对整个结构体变量的引用的其他方法。功能:对整个结构体变量进行操作。
编程题:展示对整个结构体变量的引用的其他方法。功能:对整个结构体变量进行操作。#include<stdio.h>voidmain(){structperson{charname[20];charsex;structdate {intyear; intmonth; intday; }birthday; floatheight;}per1,per2={"LiPing","M",2013,12,15,175.5};per1=p..
分类:其他好文   时间:2014-05-21 00:20:43    阅读次数:249
编程题:引用共用体变量的成员
编程题:引用共用体变量的成员#include<stdio.h>voidmain(){uniontemp{chara;intb;}t;t.a=66;t.b=266;/*266=256+10即266的二进制为100001010,所以高字节放低字节放10*/printf("%x:%d,%x:%d\n",&t.a,t.a,&t.b,t.b);}分析代码的算法:运行结果:
分类:其他好文   时间:2014-05-20 22:44:14    阅读次数:388
编程题:结构体数组的引用。功能:输出结构体数组各元素的成员值
编程题:结构体数组的引用。功能:输出结构体数组各元素的成员值#include<stdio.h>voidmain(){structperson{charname[20];charsex;intage;floatheight;}per[3]={{"LiPing",‘M‘,20,175},{"WangLing",‘F‘,19,162.5},{"ZhaoHui",‘M‘,20,178}};inti;for(i=0;i<3;i++)print..
分类:其他好文   时间:2014-05-20 21:31:06    阅读次数:336
编程题:枚举变量作为循环控制变量
编程题:枚举变量作为循环控制变量#include<stdio.h>voidmain(){enumseason{spring=1,summer,autumn,winter}s;for(s=spring;s<=winter;s++) printf("%d\n",s);}
分类:其他好文   时间:2014-05-20 21:27:05    阅读次数:357
编程题:枚举元素的判断比较,功能:枚举变量作为循环控制变量
#include<stdio.h>voidmain(){enumseason{spring=1,summer,autumn,winter}s;for(s=spring;s<=winter;s++) printf("%d\n",s);}
分类:其他好文   时间:2014-05-20 19:49:00    阅读次数:315
编程题:指针变量指向结构体数组。
编程题:指针变量指向结构体数组。#include<stdio.h>voidmain(){structperson{charname[20];charsex;intage;floatheight;}per[3]={{"LiPing",‘M‘,20,175},{"WangLing",‘F‘,19,162.5},{"ZhaoHui",‘M‘,20,178}};structperson*p;for(p=per;p<per+3;p++)printf("%-18s%3c%..
分类:其他好文   时间:2014-05-20 18:57:32    阅读次数:255
编程题:对结构体变量中成员的引用展示。
编程题:对结构体变量中成员的引用展示。#include<stdio.h>voidmain(){structperson{charname[20];charsex;structdate {intyear; intmonth; intday; }birthday; floatheight;}per;printf("Enterthename:");gets(per.name);per.sex=‘M‘;per.birthday.year=2013;per.birthd..
分类:其他好文   时间:2014-05-20 18:41:16    阅读次数:360
编程题:为枚举类型变量赋值。将整型值强制类型转换成枚举类型赋值
编程题:为枚举类型变量赋值。将整型值强制类型转换成枚举类型赋值#include<stdio.h>voidmain(){enumseason{spring,summer,autumn,winter}s1,s2;s1=summer;s2=(enumseason)2;printf("s1=%d,s2=%d\n",s1,s2);}
分类:其他好文   时间:2014-05-20 17:51:10    阅读次数:224
js子窗口操作父窗口的标签
======================================父窗体<inputid="aaaa"type="button"/> functionupfile() { resultValue=window.showModelessDialog("ceshi.aspx?file=DownFile",window,"dialogWidth=700px;dialogHeight=70px"); }======================================子窗..
分类:Web程序   时间:2014-05-20 17:27:59    阅读次数:362
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!