CP3hzzzzz 发表于 2020-9-24 17:03:48

膜拜。

雪之下雪乃. 发表于 2020-9-24 17:48:37

答案

Liangzz 发表于 2020-9-24 18:49:56

wo ai xiao jia yu

gdut1111 发表于 2020-9-24 19:33:18

1

7962356 发表于 2020-9-24 20:10:14

0. 计算机只能识别二进制
1. 机器语言
2. 编译
3. 编译型语言在程序执行之前,有一个单独的编译过程,将程序翻译成机器zhi语言,以后执行这个程序的时候,就用再进行翻译了。解释型语言,是在运行的时候将程序翻译成机器语言,所以运行速度相对于编译型语言要慢。
4. 应该可以?
5. 解释型语言先天就和平台联系很少,所以,用解释型语言写出来的一份同样的程序,只要通过不同的解释器解释,就可以在对应不同的平台上使用。
6. 电线型号,翻译成语言
7. QINMEN
    CHEND
    IRENC
    HIFAN
    SHIF
    ADONG
    JINOG
    NO
   

爱自由的靖哥哥 发表于 2020-9-24 20:16:45

为什么我写的和作者一样但是我的程序提醒是错的啊,但是把代码复制粘贴上去又能编写了,错误的是【MAX】

China陈永华 发表于 2020-9-24 20:43:41

支持

翻身酸菜鱼 发表于 2020-9-24 20:48:08

0:计算机只能认识二进制的“0”“1”
1:机器语言
2:编译
3:编译型语言是先全部做完在编译,解释型语言是边做边编译
4:可以
5:通过解释器
6:通过不通顺序的字母,数字,符号排列组合
7:

寒窗苦读 发表于 2020-9-24 20:57:55

6666666666666

gskhhu 发表于 2020-9-24 21:07:21

1.因为计算机只懂得二进制的0和1
2.0和1的组合称之为机器码,机器码是cpu唯一认识的语言
3.编译
4.区别是,编译型语言可事先编译然后直接cpu执行,解释型语言不会实现编译而是把代码翻译成机器语言
5.Java是由编译器成字节码再由解释器翻译再cpu执行,编译器不同和解释器不同导致她可以跨平台

#include <io.h>
#include <direct.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX256

long total;

int countLines(const char *filenma);
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;
       
        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;
}

Rwren 发表于 2020-9-24 21:32:27

括号始终是错的不知道为什么 来看看答案

izla11 发表于 2020-9-24 21:43:17

查看答案

dhjslsdb 发表于 2020-9-24 21:46:03

小黑--初学者 发表于 2020-9-24 21:52:58

11

mambageek 发表于 2020-9-24 22:31:47

1

人可金兑 发表于 2020-9-24 22:39:26

{:5_103:}

wu2099 发表于 2020-9-24 22:44:09

z.zhen521.com 发表于 2020-9-24 22:49:53

啊这

小秦学编程 发表于 2020-9-24 23:07:41

康康答案是啥

Chris599 发表于 2020-9-24 23:31:28

0.因为计算机只能识别0和1
1.机器语言
2.编译
3.解释型语言比较灵活,编译型语言比较有效率
4.可以
5.先编译成汇编语言,再变成机器语言
6.
7.
页: 859 860 861 862 863 864 865 866 867 868 [869] 870 871 872 873 874 875 876 877 878
查看完整版本: S1E2:第一个程序 | 课后测试题及答案