#include int main(void){int i = 1;int j = 100;const
int * temp = &i;printf("%d\n",*temp);i = 2;printf("%d\n",*temp);temp =
&j;printf("%d\n",*temp);ret...
分类:
其他好文 时间:
2014-05-26 23:11:42
阅读次数:
330
代码1[cpp]view
plaincopy#include#includeclassA{public:A(){printf("A()/n");}~A(){printf("~A()/n");}A(constA&other){printf("other/n");}};intmain(){Aa;Ab(....
分类:
其他好文 时间:
2014-05-26 22:18:50
阅读次数:
382
scanf("%d", &n);printf("%X\n",
n);十六进制转十进制注意8位这个提示,好好看看范围unsigned int n;scanf("%X", &n);printf("%u\n", n);
分类:
其他好文 时间:
2014-05-26 15:47:13
阅读次数:
183
1 #include 2 #include 3 4 int k=1; 5 int main() 6 {
7 int i=1; 8 char *j; 9 static int m=1;10 char *n="hello";11 12 printf("栈区地址...
分类:
其他好文 时间:
2014-05-26 14:24:28
阅读次数:
201
选自《CSDN 社区电子杂志——C/C++杂志》http://emag.csdn.net2005 年1
月 总第1 期 - 93 -本文作者:steedhorse(晨星)printf 可能是许多程序员在开始学习C
语言时接触到的第二个函数(我猜第一个是main),说起来,自然是老朋友了,可是,你对这...
分类:
其他好文 时间:
2014-05-23 04:51:17
阅读次数:
369
#include#includevoid main(){ char a[3]; char*str =
"adgc"; strcpy(a,str); printf("%s ",a);}程序运行的结果为什么是 adgc 呢? a的空间只有3个字符呢
,为什么可以存放str呢?望求解。
分类:
其他好文 时间:
2014-05-22 14:02:13
阅读次数:
265
#include "stdafx.h"#include using namespace
std;int main(){ char c,d,e,f; printf("please input two characters:\n");
c=getchar(); putchar...
分类:
其他好文 时间:
2014-05-21 23:46:19
阅读次数:
352
输出字符串:
puts()函数:
puts()函数只接受一个参数(指向要显示的字符串的指针)。由于字面字符串是一个指向字符串的指针,因此
puts()可用于显示字面字符串和字符串变量。
puts()显示完字符串后,自动换行。
puts()是一个标准的输出函数,需要包含stdio.h。
printf()函数:
printf()函数是库函数,可用于显示字符串,使用转换...
分类:
编程语言 时间:
2014-05-21 16:53:00
阅读次数:
299
Tour
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3470
Accepted: 1545
Description
John Doe, a skilled pilot, enjoys traveling. While on vacation, he rents a...
分类:
其他好文 时间:
2014-05-21 08:24:18
阅读次数:
354
#define LOCAL#include#includeconst int
MAX_N=100;int a[MAX_N],b[MAX_N];void init(){ for(int i=0;i=1) {
if(b[sum-1]<10) printf(...
分类:
其他好文 时间:
2014-05-21 04:53:29
阅读次数:
175