倒戈卸甲 发表于 2019-10-29 15:20:04

只认识0,1,二进制,编译,要不要编译,不能直接运行

风一样的勇士 发表于 2019-10-29 16:09:39

我要看答案hhhh

心安。 发表于 2019-10-29 16:53:05

前面的空格可以少点多点吗

kkxxmyt 发表于 2019-10-29 16:59:04

因为计算机只能识别机器语言
机器码
编译
是否直接编译

解释器
转化
qimenchendirenchifanshifadongjingong

584359250 发表于 2019-10-29 17:16:38

????????

Monory小乐 发表于 2019-10-29 17:24:15


;‘

小小福同学 发表于 2019-10-29 19:05:47

S1E2:第一个程序| 课后测试题及答案

李晨芳 发表于 2019-10-29 19:10:40

我太难了

Vsilence 发表于 2019-10-29 19:23:29

小甲鱼nb

ssssRita 发表于 2019-10-29 19:58:00

0.计算机智能识别0和11.机器码2.编译3.前者把源代码编译为机器代码,后者把代码转换为中间代码4.不可以5.用解释型语言6.编码和解码 7.亲们,趁敌人吃饭的时候发动进攻

2900357148 发表于 2019-10-29 20:23:25

看看答案

wyl1009 发表于 2019-10-29 20:45:20


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

Groott 发表于 2019-10-29 21:25:33

{:7_140:}

二氧化婷 发表于 2019-10-29 21:41:52

SHA

一只傻嘉毅 发表于 2019-10-29 22:19:19

查看参考答案

leave@ 发表于 2019-10-29 22:27:41

查看答案

1378560133 发表于 2019-10-29 22:58:11

1

wangquan99999 发表于 2019-10-29 23:15:09

0.只能识别二进制1和0
1.机器语言
2.编译
3.编译语言是转换成汇编语言然后转换机器语言,解释语言需要解释器
4.可以
5.通过解释器
6.通过查找指令表转换成语言

hero533 发表于 2019-10-29 23:19:46

{:10_261:}{:10_261:}{:10_261:}{:10_261:}{:10_261:}

Neos.Rex 发表于 2019-10-29 23:36:34

答案
页: 436 437 438 439 440 441 442 443 444 445 [446] 447 448 449 450 451 452 453 454 455
查看完整版本: S1E2:第一个程序 | 课后测试题及答案