Linux下完成的一个作业程序
文档创建日期:2010-02-19
[文件1: test06-08.c]
01 // P174: 2.编程题 (8)把有序的两个数组a和b合并,要求合并后的数组依然有序
02
03 // The beginning of C program: test06-08.c.
04
05 // Header files included.
06 #include <stdio.h>
07 #include "head06-08.h"
08
09 // Macro definition.
10 #define MAX_SIZE 100
11
12 // Main function's declaration.
13 int main ( void )
14 {
15 int i=0, j=0, m=10, n=10;
16 float list_1[MAX_SIZE], list_2[MAX_SIZE], element=0.0;
17
18 printf ( "Please input 10 float numbers for list_1: " );
19 for ( i=0; i<m; i++ )
20 scanf ( "%f", &list_1[i] );
21
22 printf ( "Please input 10 float numbers for list_2: " );
23 for ( j=0; j<n; j++ )
24 scanf ( "%f", &list_2[j]
相关文档:
众所周知,网络安全是一个非常重要的课题,而服务器是网络安全中最关键的环节。Linux被认为是一个比较安全的Internet服务器,作为一种开放源代码操作系统,一旦Linux系统中发现有安全漏洞,Internet上来自世界各地的志愿者会踊跃修补它。然而,系统管理员往往不能及时地得到信息并进行更正,这就给黑客以可乘之机。然而 ......
查看系统的磁盘信息:
fdisk -l
[root@localhost home]# fdisk -l
Disk /dev/hda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 979 7759395 ......
Internet------(eth1)router1(eth2)------(eth1)router2(eth0)------(eth0)router3(eth1)------(eth0)pc
上面就是我的网络拓扑结构,其中路由器1是用来连接外部网络的一台linux机器,图中所有路由器都是普通的pc机,这些pc都安装了ubuntu桌面系统,除了最右边的pc,其余的pc都装了3张网卡(其中一张备用)。
由于Debian系 ......
花了一个周末的时间列出来的。共享出来,希望大家花几分钟看看。这也算是LINUX下比较实用的查找方式了
which(寻找“执行文件”)
[root@localhost home]# which [-a] command
-a : 将所有可找到的命令均列出,而不仅仅列出第一个找到的命令名称
范例:
[root@localhost home]# which passwd
/usr/bin/passwd ......
在执行make menuconfig 命令进行内核配置时,输出下面的出错信息:
yyh:~/clfs/sources/linux-2.6.17.13$ make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
HOSTCC scripts/kconfig/conf.o
HOSTCC scri ......