摘要:
Server sidedefine sockaddr_instructure sockaddr_in serveraddr, clientaddrnew a socketserver_socket = socket (AF_INET, SOCK_STREAM, 0)setup serveraddrserveraddr.sin_familyserveraddr.sin_portserveraddr.sin_addr.s_addr = htons(INADDR_ANY)bind serveraddr to server_socketbind(server_socket, (struct socka 阅读全文
摘要:
bzero置字节字符串s的前n个字节为零。#include <syslib.h> #include <string.h> int main() { struct { int a; char s[5]; float f; } tt; char s[20]; bzero(&tt,sizeof(tt)); // struct initialization to zero bzero(s,20); clrscr(); printf("Initail Success"); getchar(); return 0; }extern void *memse 阅读全文