局部变量作函数返回值的问题 摘要: 函数的返回值,必须保证在使用时,他所对应的变量值不应被销毁。防止变量被销毁的方式:1.定义全局变量;2.定义静态变量;3.在堆区定义变量;4.定义在常量区,如字符串常量。 …… 文章列表 2017年10月21日 3 点赞 0 评论 1340 浏览 评分:0.0
1051(奇了怪了) 摘要://报错:答案错误 //谁能告诉我那错了,输出格式也是严格按照他的要求,连多余的空格都清除了 #include <stdio.h> #include <string.h> #define n…… 文章列表 2017年10月21日 0 点赞 0 评论 1452 浏览 评分:0.0
1071题解 摘要:#include <stdio.h> double fact(int k) { int i; double result = 1.0; //注意数据格式,此平台对程序的严谨性要求…… 文章列表 2017年10月20日 1 点赞 0 评论 1150 浏览 评分:0.0
数组与指针的问题 摘要: 众所周知,数组名的值是一个指针常量,即数组第一个元素的地址,它的类型取决于数组元素的类型。此外,作为参数的数组声明,C语言中会自动将作为参数的数组名转换为相应的指针声明。例:int st…… 文章列表 2017年10月20日 3 点赞 0 评论 1005 浏览 评分:0.0
1054题解 摘要:#include <stdio.h> int isprime(int x) { int i,nprime = 0; for(i=2;i<=x;i++) { if((0 == …… 文章列表 2017年10月20日 1 点赞 0 评论 1114 浏览 评分:0.0
1048题解(读入回车问题) 摘要:#include <stdio.h> int main() { int i = 0,count,num; char s[1000]; scanf("%d",&count); //以…… 文章列表 2017年10月20日 0 点赞 0 评论 1205 浏览 评分:0.0
关于float,double变量的几点说明 摘要: 浮点数家族包括float,double,long double类型。通常,float以1个字32bit表示,7个有效位;double以2个字64bit表示,16个有效位;,long d…… 文章列表 2017年10月18日 0 点赞 0 评论 2484 浏览 评分:0.0
1128题解(返回值为数组的情况) 摘要://本题方法并不是最简单的,只是为了练习返回值为数组的情况,以及有关数组和指针之间的内在联系#include <stdio.h> #include <stdlib.h> #include <str…… 文章列表 2017年10月18日 2 点赞 0 评论 1078 浏览 评分:0.0
大家好,我是验题君 摘要:大家好,我就是传说中的验题君,大家有任何题目问题,可以来私信我、留言~欢迎大家提供建设性意见,让C语言网更好,帮助更多的初学者!…… 文章列表 2017年10月18日 6 点赞 6 评论 865 浏览 评分:7.7
1126题解 摘要:#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){ int i=0,j=0,length = 0; char c,s…… 文章列表 2017年10月18日 0 点赞 0 评论 918 浏览 评分:0.0