计算中···
--------------------------------
Process exited after 5.153 seconds with return value 3221225477
我想知道上面显示的是什么意思
🐟飞飞飞飞飞飞
加油
66666666666666666666666666
1
看看
0.因为计算机只懂得0和1
1.CPU唯一认识的语言是机器码也是机器语言
2.C语言编写的源代码转换为汇编语言的过程叫编译
3.本质区别就是解释型语言不会将源代码直接转化为机器代码而需要解释器进行翻译,效率相对较低。
4.由于C语言的可移植性高,所以能
5.通过将源代码转换成中间代码然后发送给解释器,由解释器逐句翻译给CPU执行,以此来实现跨平台
6.通过符号对我们所用的语言进行加密再通过摩斯密码对照表进行翻译。
7.亲们趁敌人吃饭发动进攻
xc
1
为什么结果是0?
答案
ya
头疼
zan
66666666666666666666
回复
#include <io.h>
#include <direct.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 256
long total;
int countLines(const char *filename);
void findAllCodes(const char *path);
void findALLFiles(const char *path);
int countLines(const char *filename)
{
FILE *fp;
int count = 0;
int temp;
if ((fp = fopen(filename, "r")) == NULL)
{
fprintf(stderr, "Can not open the file:%s\n", filename);
return 0;
}
while ((temp = fgetc(fp)) != EOF)
{
if (temp == '\n')
{
count++;
}
}
fclose(fp);
return count;
}
void findAllCodes(const char *path)
{
struct _finddata_t fa;
long handle;
char thePath, target;
strcpy(thePath, path);
if((handle = _findfirst(strcat(thePath, "/*.c"), &fa)) != -1L)
{
do
{
sprintf(target, "%s/%s", path, fa.name);
total += countLines(target);
}while (_findnext(handle, &fa) == 0);
}
_findclose(handle);
}
void findALLDirs(const char *path)
{
struct _finddata_t fa;
long handle;
char thePath;
strcpy(thePath, path);
if((handle = _findfirst(strcat(thePath, "/*"), &fa)) == -1L)
{
fprintf(stderr, "The path %s is wrong!\n",path);
return;
}
do
{
if (!strcmp(fa.name, ".") || !strcmp(fa.name, ".."))
continue;
if( fa.attrib == _A_SUBDIR)
{
sprintf(thePath, "%s/%s", path, fa.name);
findAllCodes(thePath);
findALLDirs(thePath);
}
}while (_findnext(handle, &fa) == 0);
_findclose(handle);
}
int main()
{
char path = ".";
printf("计算中...\n");
findAllCodes(path);
findALLDirs(path);
printf("目前你总共写了 %ld 行代码!\n\n", total);
system("pause");
return 0;
}
{:10_298:}来瞧瞧答案.jpg
111
来看答案了