题目在这里:​c语言笔试面试大全,C语言基础笔试题_Thomas杨大炮的博客-CSDN博客t​

2. C语言程序的三种基本结构都有哪些呢?

3. ​​递归调用​​和间接递归调用

​定义​

用途:递乘,递加

4. 文本文件和二进制文件

定义

二进制文件的来源

6、应该是不合法的数据类型吧?“unknown type name 'integer”

7. %模运算。

情况一:

int i = 1;
double j = 3;
l = i%j;

error: invalid operands to binary % (have 'int' and 'double')|

情况二:

double i = 1;
int j = 3;
l = i%j;

error: invalid operands to binary % (have 'double' and 'int')|

情况三:

double i = 1;
int j = 3;
l = i%j;

error: invalid operands to binary % (have 'double' and 'double')|


9.实在函数

举个例子把,比如有这个一个函数int a(int b){...};

其中那个b就是形式参数,当你调用这个函数时a(3){...};

3就是实在参数.

1、它们的地址值是相等的。

2、第1个元素的地址如果是p,则p+1就是第2个元素的地址。

参考https://zhidao.baidu.com/question/581103677.html

3、数组的首地址如果是p,则p+1就跳过第一个元素而指向下一个元素的第一字节吧?(测试代码如下)。

int main()
{
int b[] = {10, 20, 30};
printf("sizeof(b) = %d\n", sizeof(b));
printf("sizeof(b[0]) = %d\n", sizeof(b[0]));
printf("b = %d\n", b);
printf("b[0] = %d\n", b[0]);
printf("&b[0] = %d\n", &b[0]);

printf("b+1 = %d\n", b+1);
printf("&b[0] = %d\n", &b[1]);
printf("b+2 = %d\n", b+2);
printf("&b[0] = %d\n", &b[2]);
printf("b+3 = %d\n", b+3);
}

11、这题好像有错。

C语言中提供的合法关键字是____ A、switch B、cher C、case D、default、选B


  1. 顺序存取,文件读写数据的顺序和数据在文件中的物理顺序是一致的。

随机存取,对任何位置上的数据进行访问。如,读取第2,4,6......个学生的成绩。


  1. ​C语言基本数据类型​
  2. sizeof(float) = 4

16.

printf("10!=9 = %d\n", 10!=9);

结果:1


18.TC20

​Turbo C 2.0和Turbo C 3.0有什么不同?​

​Turbo C2.0与3.0,有什么区别,哪个好​

c语言中,int最大值是2147483647。

int i=65536;
printf("i = %d",i);

结果:i = 65536


20、嵌套子程序,​​解释​​。我不懂。

​嵌套分支学习​

21、​​基类型相同的指针可以进行哪些运算​

​什么是基类,什么是派生类​

22、A和C好像都可以。​​参考这个解析吧?​

long l = 75;
printf("%d\n", l);
return 0;

25、运行了一下选D。

请参考:

​C语言中'\1'表示什么意思​

​c语言中 \\ 是什么意思​

写代码测试一下

#include <stdio.h>
#include <stdlib.h>

int main()
{
printf("%d",strlen("ATS012\1\\"));
printf("%d",strlen("\1"));
printf("%d",strlen("\\"));
printf("\1");
printf("\\");
return 0;
}

结果:811

26、请参考​​百度知道​​。

27、请参考​​百度知道​​。

28、​​为什么unsigned (-1)表示无符号整数的最大值​

B站视频降解:​​原码、反码和补码的相关知识点​


  1. 题目好像错了,请看​​百度知道​​。
  2. 请参考​​百度知道​​。

测试 a=1的代码。

#include <stdio.h>
#include <stdlib.h>

int main()
{
int a=0;

if (a =1) {
printf("%d",a);
}
return 0;
}

结果:1

32、请参考​​百度知道​​。

​C语言用printf读取和输出double类型​

34、题目有误,请参考 ​​https://wenku.baidu.com/view/70aa1b93ba4ae45c3b3567ec102de2bd9705deeb.html​

#include <stdio.h>
#include <stdlib.h>

int main()
{
int x,y;
char a,b,c;

scanf("%d%d%c%c%c%c%c%c:",&x,&y,&a,&a,&b,&b,&c,&c);
printf("%d%d%c%c%c",x,y,a,b,c);

return 0;
}

输入:

1 2

A B C

输出:

12ABC

35、

#include <stdio.h>
#include <stdlib.h>

int main()
{
char s[10];
s="abcd";
printf("%s",s);

return 0;
}

输出:

error: assignment to expression with array type


#include <stdio.h>
#include <stdlib.h>

int main()
{
char s[10]="abcd";
printf("%s",s);

return 0;
}

输出:

abcd

37、解析请参考

​https://zhidao.baidu.com/question/1995683390006611827.html​


39、请参考解析

​https://zhidao.baidu.com/question/1610323561555898787.html​

​https://easylearn.baidu.com/edu-page/tiangong/questiondetail?id=1722668810156435597&source=tikushiti&source_id=32e3d80d4a7302768e993911​

常量、变量和表达式可作为实参。

40、题目有误,题目和解析请参考

​https://zhidao.baidu.com/question/1738378297675767507.html​

41、题目有错误,题目和解析请参考

​https://easylearn.baidu.com/edu-page/tiangong/questiondetail?id=1711626220543333419&fr=search​

42、题目有错误,题目和解析请参考

​https://easylearn.baidu.com/edu-page/tiangong/questiondetail?id=1722646333493456392&source=tikushiti&source_id=a5b8ac0ef12d2af90242e642​

43、解析请参考

​https://easylearn.baidu.com/edu-page/tiangong/questiondetail?id=1722748099962623213&fr=search​

46、​​C语言 逻辑运算符及其优先级​

题目有错,请参考

​https://easylearn.baidu.com/edu-page/tiangong/questiondetail?id=1722842780473560093&source=tikushiti&source_id=38ee213e0912a2161479298f​

47、取最后一个数

#include <stdio.h>
#include <stdlib.h>

int main()
{
int x, y, z, k;
x=(y=4,k=32,z=16);
printf("%d",x);

return 0;
}

逗号表达式和括号的问题,请参考

​https://zhidao.baidu.com/question/439246879962650684.html​

49、题目有错,请参考

​https://qb.zuoyebang.com/xfe-question/question/72730c220ca917dcc3c77c97ca82bfa1.html​