你知道以下程序的输出吗?
2012-04-26 17:46
211 查看
#include "stdio.h" main() { char ch[]="aehi"; char *pch=ch,*p,*t,*q,*m; m=p=t=q=pch; printf("%p ",pch); printf("\n"); printf("%p ",p); printf("%c ",*(p+1)); printf("%p ",p); printf("\n"); printf("%p ",m); printf("%c ",*m++); printf("%p ",m); printf("\n"); printf("%p ",t); printf("%c ",*++t); printf("%p ",t); printf("\n"); printf("%p ",q); printf("%c ",++*q); printf("%p ",q); printf("\n"); printf("%s",ch); }
#include "stdio.h" main() { int j,i=2; i++,i++,j=i++; printf("%d\n",j); printf("%d\n",i); }
#include "stdio.h" main() { int i=10; i=i-- - --i*(i=-3)*i++ + ++i; printf("%d \n",i); }
#include "stdio.h" int f() { static int i=1; return(++i); } main() { int j; j=f()-f()*f(); printf("%d",j); }
#include "stdio.h" main() { int i; unsigned int j; i=-1; j= (~0); if(i==j) printf("EQU."); else printf("Not EQU."); }
#include "stdio.h" main() { int i,j,k; i=0; j=1; k=2; if( i&&++j) printf("%d,",j); printf("%d,",j); if( k||++j) printf("%d",j); printf("%d,",j); }
#include "stdio.h" main() { printf("%x \n",(2<<-1)); printf("%x \n",(2<<-2)); printf("%x \n",(2<<-3)); printf("%x \n",(4<<-1)); printf("%x \n",(4<<-2)); printf("%x \n",(4<<-3)); printf("%x \n",(1<<4)); printf("%x \n",(-1<<-4)); printf("%x \n",(-1<<4)); }
#include <stdio.h> main() { printf("%d",sizeof"A"); printf("%d",sizeof'A'); }
#include <stdio.h> int olddef(float d,char i); //int newdef(float d,char i); main() { float d = 10.0; char j = 3; int i=1020; olddef(d,j); newdef(d,j); } olddef(d,i) float d; char i; { printf("olddef: float = %f,char = %x \n",d,i); } newdef(float d,char i) { printf("new: float = %f,char = %x \n",d,i); }
#include "stdio.h" void main() { int a; a=/*/*/0*/**/1; printf("%d",a); }
相关文章推荐
- win7上运行某程序的时候,如果这个程序需要以管理员的身份运行,那么就会有“用户帐户控制”的提示:“您想允许来自...发布者的以下程序对此计算机进行更改吗?”请问,win7如何知道哪些程序需要以管理员的身份运行?
- 面试题:以下程序的输出结果是什么?
- 如何快速的知道程序中输入的大段数据哪一行没有被正确执行或输出
- java集合类面试题以下程序的输出结果是什么
- 字符串面试题:以下程序的输出结果是
- 以下程序输出结果是____。
- 面试题:以下程序的输出结果是
- 面试题 以下程序的输出结果是什么
- 编写一个程序,输出以下图案
- 不上机实验 你能知道这段程序输出什么吗
- 统计和输出实验 8 数组2 一次考试中的最高分、最低分、平均分,以及在90~100、 80~89、 70~79、 60~69和60分以下各分数段的人数。程序代码如下
- 简化以下程序,将函数对象 divide_by 转换为一个函数,并将 for 循环替换为用一个标准的 C++ 算法来输出数据
- 实验8 统计和输出一次考试中的最高分、最低分、平均分,以及在90~100、 80~89、 70~79、 60~69和60分以下各分数段的人数。程序代码如下(可复制):
- 习题 1.5 请参照本章例题,编写一个C程序,输出以下信息:*****Very good!*****
- 以下C#程序的输出结果是( )。
- Android程序能够构建和运行,但是报以下报错,为什么?
- 给出一百分制成绩,要求输出成绩等级'A',要求输出成绩等级 ‘A’'B''C''D''E',90分以上为A,80-89为B,70-79为C,69-69 为D,60分以下为E。*/
- 输入两个整数n和m, 从数列1,2,...,n中任意选择几个数,使其和等于m, 要求编写程序输出所有的组合
- C++ 控制台程序中输出UTF8字符乱码问题解决方法
- 用户输入M,N值,从1至N开始顺序循环数数,每数到M输出该数值,直至全部输出。写出C程序。