梦中的午后 发表于 2022-12-24 00:04:36

问答题答案:



动动手答案:
查看参考答案


fang-kuai 发表于 2022-12-24 00:44:05

本帖最后由 fang-kuai 于 2022-12-24 01:28 编辑

问答题答案:
0.因为只懂 0和1
1.机器语言
2.编译
3.编完再译,边编边译
4.emmm不能?
5.通过能解释字节码解释器,只要有其解释器就能将相应的字节码翻译给CPU
6.通过 点 横 的排序来组成相应字母
7.亲们趁敌人吃饭时发动进攻




动动手答案:
成功了,这图我不会传

葫芦大师 发表于 2022-12-24 10:28:23

问答题答案:



动动手答案:


CiCi1573 发表于 2022-12-24 12:46:23

问答题答案:



动动手答案:


katit 发表于 2022-12-24 13:55:22

查看参考答案问答题答案:



动动手答案:


Catfisher 发表于 2022-12-24 16:40:18

问答题答案:



动动手答案:


小唐鱼 发表于 2022-12-24 17:08:53

问答题答案:
查看参考答案


动动手答案:


Cc灏 发表于 2022-12-24 18:12:40

问答题答案:



动动手答案:计算中


GAkki4ever 发表于 2022-12-24 19:42:11

问答题答案:



动动手答案:


chenyijing 发表于 2022-12-24 22:30:48

问答题答案:



动动手答案:


User_Cloud 发表于 2022-12-24 23:43:43

问答题答案:



动动手答案:


阿树树 发表于 2022-12-25 09:36:28

问答题答案:
亲们,趁敌人吃饭时发动进攻



动动手答案:
"C:\Users\DELL\Desktop\微信图片_20221225093606.png"


Sherry笑 发表于 2022-12-25 10:18:06

Windows动动手不能正常编译

    } while (_findnext(handle,&fa)==0); 处显示segmentation fault

花郎格 发表于 2022-12-25 13:44:34

问答题答案:



动动手答案:


荔枝学C得皮卡 发表于 2022-12-25 14:46:42

问答题答案:

1

动动手答案:


乄FISHC 发表于 2022-12-25 16:06:57

问答题答案:



动动手答案:


zuinsung 发表于 2022-12-25 16:12:32

问答题答案:
我的智商凹地是拼音。。。

动动手答案:的

nlpu 发表于 2022-12-25 16:23:51

问答题答案:



动动手答案:


hhh45 发表于 2022-12-25 17:27:14

问答题答案:
0.只懂0、1
1.机器语言
2.编译
3.被cpu读取执行
4.不能
5.编程语言写到字节码,再从字节码转到解释器,最后转到cpu执行
6.查表
7.亲们趁敌人吃饭时发起进攻

动动手答案:
计算中...

徐怀志 发表于 2022-12-25 20:20:53

本帖最后由 徐怀志 于 2022-12-25 20:23 编辑

问答题答案:



动动手答案:这个fa 是哪里来的喔

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

    return 0;
}


页: 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 [1820] 1821 1822 1823 1824 1825 1826 1827 1828 1829
查看完整版本: S1E2:第一个程序 | 课后测试题及答案