#include <stdio.h>
union
{
int i;
char x[2];
}a;
int main()
{
a.x[0] = 10;
a.x[1] = 1;
printf(“%d”,a.i);
return 0;
}
结果是:266
这个结果怎么……继续阅读 »
10年前 (2015-05-11) 1458浏览 0评论
0个赞
在当前目录
make — bin 存放可执行文件
|— include 头文件
|— obj 目标文件
|— src .c文件
|— makefile
OBJ = obj/fun.o obj/main.o
……继续阅读 »
10年前 (2015-05-11) 1263浏览 0评论
0个赞
#include <stdio.h>
#include <string.h>
int main()
{
int i=0;
int t=0;
char buffer[]=”www.baidu.com|www.taobao.com|www.youku.com|111.208.55.7″;
char *……继续阅读 »
10年前 (2015-05-11) 1739浏览 0评论
0个赞
局部变量
如下:为什么输出的会是9和10呢,我觉得应该是8和9;还有,第一次执行my(4),count被初始化了,再执行my(5),count还会初始化吗
#include<stdio.h>
int my(const int a)
{
static int count = a;
return count + a;……继续阅读 »
10年前 (2015-05-11) 1278浏览 0评论
0个赞
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int a[255],b[255],C[505];
char c[255],d[255];
void f(int L1,int L2)
{
int i,j;
for(i=0;i<L……继续阅读 »
10年前 (2015-05-11) 1180浏览 0评论
0个赞
C语言
数组
存储方式
内存
各位大神,我是初学者,请求帮忙解决一个小问题:
int arry[5={1,2,3,4,5};
printf(“%d\n”,strlen(arry));
输出结果是1;
我在网上搜索说是 arry[0]占4个字节:0x01 0x00 0x00 0x00
那么strlen(arry)从0……继续阅读 »
10年前 (2015-05-11) 1624浏览 0评论
0个赞
int _tmain(int argc, _TCHAR* argv[])
{
//initiation
_TCHAR* filename=_T("regenerate_original_picture.txt");
unsigned char data[256];
int packetlen=256;
static unsigned……继续阅读 »
10年前 (2015-05-11) 2668浏览 0评论
0个赞
c语言
代码在下面:
#include”stdio.h”
main()
{
typedef struct
{
int num;
char name[20];
char sex;
float score;
}student;
student stu1;
scanf(“%d”,&stu1.n……继续阅读 »
10年前 (2015-05-11) 1035浏览 0评论
0个赞
msdn
http://msdn.microsoft.com//library/aa289765(v=vs.71).aspx
这个页面上说的是可以下载代码的啊,但是没有说从哪儿下载,有人知道么?
50分
搜索下载MSDN98
引用 1 楼 zhao4zhong1 的回复:
搜索下载MSDN98
不好找了
……继续阅读 »
10年前 (2015-05-11) 1308浏览 0评论
0个赞