柒仟贰 发表于 2021-10-14 22:55:53

答案

gdlulu 发表于 2021-10-14 23:00:50

66666666666

Vinciqiu 发表于 2021-10-14 23:31:56

谢谢甲鱼哥

忘我行 发表于 2021-10-14 23:47:43

感谢分享

洛生 发表于 2021-10-14 23:53:06

第一天

jzddxxz 发表于 2021-10-15 00:26:16

daan

菜鸡初学者 发表于 2021-10-15 01:03:07

{:10_333:}

ab515321 发表于 2021-10-15 01:05:17

我来看看

Wong11110 发表于 2021-10-15 10:28:56

0.cpu理论上只认识0和1,由此要通过编程来讲我们的语言转化成c语言能够理解的语言
1.机械语言
2.编译
3.编译型语言可将源代码直接翻译成cpu的语言,而解释型语言是要通过编译器来逐句翻译
4.不能,不同的操作系统在可执行文件准备工作的准备进程是不同的
5.解释型编程语言是将解释器作为每个系统的中轴
6.将特殊的符号代表的特殊的字母,实质上与c语言编写的源代码转化为cpu能够懂的语言相似
7.亲们,趁敌人吃饭时发起进攻

419357927 发表于 2021-10-15 10:46:39

查看答案

照烧鸡腿饭大厨 发表于 2021-10-15 11:16:45

终于做完了~

Ch1rs 发表于 2021-10-15 11:44:22

11

名字好难XIANG 发表于 2021-10-15 12:05:19

.

凛冬x 发表于 2021-10-15 12:15:28

#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("目前你总共写了 %1d 行代码! \n\n", total);
        system("pause");

        return 0;

}
请问为什么不能运行呜呜呜

钟一一 发表于 2021-10-15 12:15:56

g

Xzzen 发表于 2021-10-15 13:15:17

o

banquetal 发表于 2021-10-15 13:48:58

{:5_105:}

苏飞不会飞 发表于 2021-10-15 14:03:18

enne

Asheen 发表于 2021-10-15 14:40:43

0. 计算机只认识二进制机械语言

1. CPU只认识汇编

2. 编译

3. 不知道

4. 可以

5. 通过不同的编译器

6. 原理二进制编译字母

Jd19 发表于 2021-10-15 14:59:24

答案
页: 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 [1419] 1420 1421 1422 1423 1424 1425 1426 1427 1428
查看完整版本: S1E2:第一个程序 | 课后测试题及答案