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]
相关文档:
public class Test {
public static void main(String aa[]) {
if (System.getProperty("os.name").equals("Linux")) {
System.out.println("linux");
} else if (System.getProperty("os.name").equals("Windows XP")) {
System.out.println("win ......
查看系统的磁盘信息:
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 ......
Linux下关机最要有以下方法,我想这些方法足以满足你的需要:
[root@localhost /]# shutdown [-t秒] [-arkhcncfF] [时间] [提示信息]
[root@localhost /]# shutdown -h 10 'I will shutdown after 10 mins'
-t sec : -t 后加秒数,即‘过几秒钟后关机’的意思。
-k : 不要真的关机,只是发送提示信息。
......
Linux
版本
一览
Linux
是一套免费使用和自由传播的类
Unix
操作系统。我们通常所说的
Linux
,指的是
GNU/Linux
,即采用
Linux
内核的
GNU
操作系统。由于
Linux
是一个内核,它只是操作系统的核心,负责控制硬件、管理文件系统、程序进程等。然而一个完整的操作系统不仅仅是内核 ......