考试网 >> IT认证 >> 水平 >> 软件指导 >> 近三年高级程序员试题知识点比较

近三年高级程序员试题知识点比较

发布时间:2006-06-28 04:59     点击:
分页:[1] 2  下一页

 

1、上午试题



结论:上午考试越来越简单,但范围扩大,新知识点增多。



2、下午试题



结论:下午考试越来越实用,软件工程知识增多,体现出“系统设计师”的职责。



 

在写整型数据前,先转换一下: 

    i= htonl(i); 

    write_data(s, &i, sizeof(i));

    在读整型数据后,再转变回来:

    read_data(s, &i, sizeof(i));

    i= ntohl(i);

    示例

#include /* obligatory includes */ 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#define PORT 3490

int main( int argc,char *argv[] )

{ int sockfd,nbytes; //套接字描述符、读入缓冲区的字节数

char buf[1024]; //缓冲区

struct hostent *he; //主机信息类型

struct sockaddr_in srvaddr;//Internet套接字结构

if ( (1) argc!=2 )

{ perror( "调用参数为零,请输入服务器的主机名!\n" ); exit(1);}

if ( (2) (he=gethostbyname(argv[1]))==NULL) //如果通过主机名没有获得对应的主机 信息就提示用户

分页:[1] 2  下一页
版权申明:未经书面授权请勿转载本站信息!!作品版权归所属媒体与作者所有!!
发表评论: 匿名发表 用户名: 查看评论
您将承担一切因您的行为、言论而直接或间接导致的民事或刑事法律责任
留言板管理人员有权保留或删除其管辖留言中的任意内容
本站提醒:不要进行人身攻击。谢谢配合。
在本站搜索相关信息
2003-2005 Ksw123.com All Rights Reserved. - TOP
Copyright © 2006 Ksw123.com. All rights reserved.中国考题网 版权所有