一、实验代码#include void print(char s[]);int main(){
print((char *)"abcdef"); return 0;}void print(char s[]){
printf("%s\n",s);}二、实验结果输出:abcdef三、调...
分类:
其他好文 时间:
2014-05-09 09:37:30
阅读次数:
414
http://acm.hdu.edu.cn/showproblem.php?pid=3309
1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7
8 char s[30][3...
分类:
其他好文 时间:
2014-05-09 07:52:24
阅读次数:
328
单词不换行
word-break:"break-all"text-overflow:ellipsis;
超出部分用...代替overflow:hidden;超出不分隐藏字体显示在一行 white-space:"nowrap"想要字体换行显示
max-height:""; 原价...
分类:
其他好文 时间:
2014-05-09 07:45:10
阅读次数:
238
void fun(char *str){ char *a = new
char[strlen(str)+1]; memcpy(a, str, strlen(str)+1); if (...) { return; } else if
(...) {return; } delete a; return;...
分类:
其他好文 时间:
2014-05-09 07:35:24
阅读次数:
257
最近无聊,再学学unp吧。学学网络编程。下面是一个demo:intro/daytimetcpcli.c#include
"unp.h"intmain(int argc, char **argv){ int sockfd, n; char ...
分类:
其他好文 时间:
2014-05-09 06:39:40
阅读次数:
333
/*
* uva575
* Date:2014/5/7
* State: AC
*/
#include
#include
#include
#include
#include
using namespace std;
const int MAXN=34;
char Arr[MAXN];
int main()
{
//cout << "Hello world!" << end...
分类:
其他好文 时间:
2014-05-09 02:25:56
阅读次数:
269
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
测试程序:
#include
#include
struct dev
{
int a;
char b;
float c;
};
struct dev devs[]=
{
{
1,'a',7.0,
},
{
1,'a',7.0,
},
{
...
分类:
系统相关 时间:
2014-05-09 02:10:16
阅读次数:
494
chapter 8 内核代码
8.1.1中断处理程序
traps.c
#define get_seg_byte(seg,addr) ({ \ //取seg中addr处1byte
register char __res; __asm__("push %%fs;mov %%ax,%%fs;movb %%fs:%2,%%al;pop %%fs" ...
分类:
系统相关 时间:
2014-05-09 01:48:26
阅读次数:
418
#include
#include
#define FALSE 0 //函数执行错误返回0
#define TRUE 1 //函数执行正确返回1
//串的堆分配存储表示
typedef struct
{
char *ch;
int length;
}String;
//对串的所有操作都可以通过以下五个基本函数实现
void StrInit(String *);//串的初始化...
分类:
其他好文 时间:
2014-05-09 01:25:02
阅读次数:
294