Linux下完成的一个作业程序
文档创建日期:2010-02-19
01 // P173: 2.编程题 (7)
02
03 // The beginning of C program: test06-07.c.
04
05 // Header files included.
06 #include <stdio.h>
07
08 // Macro definition.
09 #define MAX_SIZE 100
10
11 // No.1: Subroutine: float rounding ( float f_num );
12 float rounding ( float f_num )
13 {
14 long int temp=0;
15 temp = (long int) (f_num * 100);
16 temp = (long int) ((f_num*100 - temp)*2 + temp);
17 f_num = temp / 100.0;
18
19 return (f_num);
20 }
21
22 // No.2: Subroutine: void select_sort ( float list[], int size ); 选择排序子函数
23 void select_sort ( float list[], int size )
24 {
25 int i, j, min;
26 float temp=0.0;
27 for ( i=0; i<size-1; i++ )
28 &
相关文档:
/*
* ioctl.c 文件实现了输入/输出控制系统调用ioctl(),该函数
* 主要是调用函数tty_ioctl()对终端的IO进行控制
*/
/*
* linux/fs/ioctl.c
*
* (C) 1991 Linus Torvalds
*/
#include <string.h>
#include <errno.h>
#include <s ......
在vm下安装unbuntu linux server 9.04
安装完成 查看IP地址 ifconfig
安装telnet sudo apt-get install xinetd telnetd
因为不需要太多人TELNET 暂时不做修改配置文件。
安装FTP sudo apt-get install vsftpd
同样不需要配置 使用默认的ftp:ftp用户访问
mysql
sudo apt-get install mysql-server
apac ......
嵌入式linux基础知识大纲
其实这段时间非常的忙,忙到连做饭吃的时间都没有了。但是今天我特意抽空,来给关注我的朋友们一点点交代。(因为今天发现关注的人还蛮多的,有点受宠若惊啊!哈哈....)如题我暂时只能给大家一些大纲,很详细的学习过程要等大概半个月的时间,我有了空闲时间才能 ......
文档创建日期:2010-02-18
01 // P173: 2.编程题 (5)输入一个字符串,统计英文字母、空格、数字和其他字符的个数。
02
03 // The beginning of C program: test06-05.c.
04  ......
Linux下关机最要有以下方法,我想这些方法足以满足你的需要:
[root@localhost /]# shutdown [-t秒] [-arkhcncfF] [时间] [提示信息]
[root@localhost /]# shutdown -h 10 'I will shutdown after 10 mins'
-t sec : -t 后加秒数,即‘过几秒钟后关机’的意思。
-k : 不要真的关机,只是发送提示信息。
......