琉璃zl 发表于 2020-10-11 10:36:51

1.计算机只认识0和1
2.机器语言
3.编译
4.是否需要解释器
5.是
6.通过解释器
7.编码和解码

IamBayMax 发表于 2020-10-11 10:44:32

好好学习

未来oO 发表于 2020-10-11 10:55:56

0.以为是二进制算法
1.机器语言
2.编译
3.一个是做好再运行,一个是一边做一遍运行
4.可以
5.因为编译时中间有个解释器,再运行到其他平台
6.编译和解释

pan少了g 发表于 2020-10-11 11:22:31

答案

Mr.mei 发表于 2020-10-11 11:33:58

加油加油努力努力

yhsama 发表于 2020-10-11 12:02:49

来吧

小何爱吃肉肉 发表于 2020-10-11 12:15:44

lihaile

2877892081 发表于 2020-10-11 13:30:44

#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);
                if((handle = _findfirst(strcat(thePath, "/*"), &fa)) == -1L)
                {
                        fprintf(studerr, "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);
                                        findAllCodes9(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;
        }

虎牙刷 发表于 2020-10-11 13:31:15

答案

寄予蓝y 发表于 2020-10-11 14:00:18

daan

一马cx 发表于 2020-10-11 14:03:34

已认真完成,不过不知道如何上传截图

C--E 发表于 2020-10-11 14:48:40

dd

洋洋送五杀 发表于 2020-10-11 14:53:54

答案

1017165985 发表于 2020-10-11 15:10:04

感谢鱼哥无私奉献!

huored 发表于 2020-10-11 15:48:22

学习

goyojiaozhu 发表于 2020-10-11 15:55:43

真的好

德里安 发表于 2020-10-11 15:56:52

0.二进制
1.机器语言

谈笑间ok 发表于 2020-10-11 16:15:04

0.2进制
1.机器码
2.编译
3.一个面向过程一个面向结果
4.能可移植性高
5.通过解释器翻译
6.翻译
7.不知道

千屿王子 发表于 2020-10-11 16:19:16

1

winmac 发表于 2020-10-11 16:59:14

感谢小甲鱼
页: 887 888 889 890 891 892 893 894 895 896 [897] 898 899 900 901 902 903 904 905 906
查看完整版本: S1E2:第一个程序 | 课后测试题及答案