Files
csapp2025/datalab/README.txt
2025-03-06 19:56:12 +08:00

48 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

数据实验
你的目标是修改bits.c文件使得其能够通过btest测试并确保不违反任何编程要求
***********************************************************
1. 修改bits.c并使用dlc来检查编程要求
***********************************************************
请仔细阅读bits.c文件中的要求其中指明了你需要遵守的编程要求。
*************************************
2. 使用btest来测试你的程序的正确性
*************************************
在lcc中新建一个工程名字叫做btest
将下列文件添加入工程:
bits.c
btest.c
decl.c
getopt.c
tests.c
编译将会生成一个btest.exe可执行文件
运行btest.exe
btest.exe [optional command line arguments]
*******************
3. btest做了什么
*******************
btest程序将通过一系列数据来测试你的bits.c是否正确。
btest的一些命令行参数
-e <N> 限制对某个函数的报错数目为N缺省该参数将会无限制
-f <Name> 检查特定名字的函数
-g 打印出简要信息(等同于 -v 0 和 -e 0)
-h 显示本信息
-a 不检查分组
-r <N> 对所有问题设置相同的权重N
-v <N> 设置显示级别为 N
N=0: 仅仅给出最终得分
N=1: N=1 另外还给出单项得分(缺省值)