5t5 发表于 2021-3-1 20:29:12

机器语言

吃翅翅 发表于 2021-3-1 20:30:47

kkk

ao二次方 发表于 2021-3-1 20:50:29

0.因为它只能看懂机器语言,其他语言一律不懂。



测试题:1.机器语言
2.编码
3.编译型语言是全部写好代码后一起进行,解释型语言则是编码一句进行一句。
4.能,因为C语言的代码在各个系统上大多数代码是相通的。
5.通过解释器来实现跨平台。
6.用特殊的符号排码来代码不同的字母
7.亲们趁敌人吃饭时发动进攻
动动手:

sssccc123 发表于 2021-3-1 21:00:28

11

郭心语 发表于 2021-3-1 21:10:40

我电脑 没GCC 巧了半年 出不来了哈啊哈{:5_105:}

诡法师 发表于 2021-3-1 21:12:52

答案

冲灬冲冲CC 发表于 2021-3-1 21:36:23

查看答案

frsoce 发表于 2021-3-1 23:51:33

写完看看答案

穆老蔫儿 发表于 2021-3-2 08:30:07

抄完了

zhuangxu123 发表于 2021-3-2 08:55:17

.

7777777-4396 发表于 2021-3-2 09:41:14

#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;
}

theonlyfuture 发表于 2021-3-2 10:24:49

zhang20151021 发表于 2021-3-2 10:57:54

A

海带烧鱼 发表于 2021-3-2 11:14:01

支持支持

2274877131 发表于 2021-3-2 12:03:46

Hello world

18277154513 发表于 2021-3-2 12:13:39

答案

吴聪波 发表于 2021-3-2 12:33:57

nice,做完

1820325405 发表于 2021-3-2 13:05:26

计算中...
目前你总共写了 108 行代码!

Z1226156191 发表于 2021-3-2 13:29:17

AA

3046912540 发表于 2021-3-2 13:31:35

1111
页: 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 [1086] 1087 1088 1089 1090 1091 1092 1093 1094 1095
查看完整版本: S1E2:第一个程序 | 课后测试题及答案