预推免常见问题

华农
1.为什么要进行软件测试,目标是什么
降低软件开发成本,保证软件质量
······················································································································································
2.如何遍历二叉树的所有叶子结点
(1)前序遍历

(2)后序遍历

(3)中序遍历
······················································································································································
3.指针和引用的区别
(指针指向一块内存,它的内容是所指内存的地址;
引用是某块内存的别名。)

指针是一个变量,存储的是一个地址,指向内存的一个存储单元;

引用是原变量的一个别名,跟原来的变量实质上是同一个东西。

指针可以在定义的时候不初始化,引用必须在定义的时候初始化

指针可以指向NULL,引用不可以为NULL

指针初始化之后可以再改变,引用不可以
······················································································································································
4.数据结构有哪几种排序方式,时间和空间复杂度,排序方法中哪几种是稳定的?

······················································································································································
5.解释一下最小生成树,怎么生成,怎么判断是叶子节点
叶子结点没有后继节点

······················································································································································
6.C和C++的区别和改进,最大的区别,为什么C++的输出快,输出有什么区别
(1)C是面向过程的语言,而C++是面向对象的语言
(2)C和C++的输入输出方式也不一样.C语言是printf/scanf(C的库函数),C++的cout/cin的后面是ostream和istream类型的对象。
(3)C和C++一个典型的区别就在动态内存管理上了,C语言通过malloc和free来进行堆内存的分配和释放,而C++是通过new和delete来管理堆内存的

······················································································································································
7.软件复用和软件老化
(1)软件复用:将已有软件的各种有关知识用于建立新的软件,以缩减软件开发和维护的花费。
(2)软件老化:是指软件系统运行速度的降低,或者是由于操作系统资源的耗尽、碎片以及错误的积累导致的程序突然崩溃。也指当软件开发完成后使用,无法满足新的情况和条件要求,软件功能不足而所处的状态,不得不打补丁或者更新版本

······················································································································································
8.物理层中什么是发送时延、传播时延
(1)传播时延: 信号在传输通道上产生的时延
(2)发送时延:以一定的速率发送完一个一定长度报文所需的时间

······················································································································································
9.基带调制的种类
调制分为两类
(1)对基带的波形进行转化,让其与信道互相适应,此类调制称为基带调制,调制后的信号仍是基带信号。
调制是把数字信号转换为另一种形式的数字信号,人们通常将这个过程称为编码(coding)。常用的编码方式有不归零制、归零制、曼彻斯特编码、差分曼彻斯特编码。

注:
1)曼彻斯特编码(相位编码)
2)差分曼彻斯特编码:
在信号位 开始时不改变信号极性表示逻辑"1"
在信号位 开始时改变信号极性表示逻辑"0" ;

如果在最初信号的时候,即 第一个信号时:
如果中间位电平从低到高,则表示0;
如果中间位电平从高到低,则表示1;

(2)另一类调制是利用载波(carrier) 将基带信号的频率范围搬移到较高的频段,并将信号转换为模拟信号。经过载波调制的信号称为带通信号(即仅在一段频率范围内能够通过信道)。使用载波的调制过程称为带通调制,常用的带通调制方式有调幅、调频和调相。

······················································································································································
10.C语言里面全局变量和局部变量的区别

(1)局部变量:定义在函数内部的变量称为局部变量(Local Variable),它的作用域仅限于函数内部, 离开该函数后就是无效的,再使用就会报错。
1)不同的函数中使用相同的变量名,它们表示不同的数据,分配不同的内存,互不干扰。
2)实参给形参传值的过程也就是给局部变量赋值的过程。
3)在 main 函数中定义的变量也是局部变量,只能在 main 函数中使用。

(2)全局变量:在所有函数外部定义的变量称为全局变量(Global Variable),它的作用域默认是整个程序,也就是所有的源文件,包括 .c 和 .h 文件。

备注:
形式参数:定义函数时,括号中的变量名称
实际参数:函数调用时,括号中的参数**(实际参数可以是常量、变量、表达式)**
······················································································································································

11.KNN和K-means的区别
(1)KNN算法
1)KNN是有监督带Label的分类算法
2)没有明显的训练过程
3)K值:对于一个样本M,要给M分类,首先在M附近找最邻近的K个数据点,并将M划分给前K个类别中出现次数最多的类别。

(2)K-Means算法
1)K-Means是无监督,数据集无Label的聚类算法(数据集是杂乱无章)
2)有明显的训练过程
3)K值:将数据分为K个簇,依靠于人的先验知识。

······················································································································································

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值