文章列表
1128题解(返回值为数组的情况)
摘要://本题方法并不是最简单的,只是为了练习返回值为数组的情况,以及有关数组和指针之间的内在联系#include <stdio.h>
#include <stdlib.h>
#include <str……
关于float,double变量的几点说明
摘要: 浮点数家族包括float,double,long double类型。通常,float以1个字32bit表示,7个有效位;double以2个字64bit表示,16个有效位;,long d……
1048题解(读入回车问题)
摘要:#include <stdio.h>
int main()
{
int i = 0,count,num;
char s[1000];
scanf("%d",&count);
//以……
1051(奇了怪了)
摘要://报错:答案错误
//谁能告诉我那错了,输出格式也是严格按照他的要求,连多余的空格都清除了
#include <stdio.h>
#include <string.h>
#define n……
局部变量作函数返回值的问题
摘要: 函数的返回值,必须保证在使用时,他所对应的变量值不应被销毁。防止变量被销毁的方式:1.定义全局变量;2.定义静态变量;3.在堆区定义变量;4.定义在常量区,如字符串常量。 ……