client socket include <sys/types.h> include <sys/socket.h> include <stdio.h> include <netinet/in.h> include <arpa/inet.h> include <unistd.h> int main() { int sockfd int len struct sockaddr_in address int result char ch = A sockfd = socket(AF_INET, SOCK_STREAM, 0) address.sin_family = AF_INET address.sin_addr.s_addr = inet_addr("127.0.0.1") address.sin_port = 9734 len = sizeof(address) result = connect(sockfd, (struct sockaddr *)&address, len) if(result == -1) { perror("oops: client") exit(1) } write(sockfd, &ch, 1) read(sockfd, &ch, 1) printf("char from server = c\n", ch) close(sockfd) exit(0) }
資源簡介:client socket include <sys/types.h> include <sys/socket.h> include <stdio.h> include <netinet/in.h> include <arpa/inet.h> include <unistd.h> int main() { int sockfd int len struct sockaddr_in address int result cha...
上傳時間: 2017-07-29
上傳用戶:wab1981
資源簡介:基于終端的訂花系統(tǒng)_socket #include<stdio.h> #include<stdlib.h> #include<errno.h> #include<string.h> #include<sys/types.h> #include<netinet/in.h> #include<sys/socket.h> #include<sys/wait.h> #include<sys/ipc.h> #include<unistd....
上傳時間: 2014-01-18
上傳用戶:003030
資源簡介:linux 下串口編程 #include <stdio.h> /*標(biāo)準(zhǔn)輸入輸出定義*/ #include <stdlib.h> /*標(biāo)準(zhǔn)函數(shù)庫定義*/ #include <unistd.h> /*Unix標(biāo)準(zhǔn)函數(shù)定義*/ #include <sys/types.h> /**/ #include <sys/stat.h> /**/ #include <fcntl.h> /*文件控制定義*/ #incl...
上傳時間: 2014-01-18
上傳用戶:xjz632
資源簡介:#include<stdio.h> #include<string.h> #include<limits.h> #include<unistd.h> #include<sys/types.h> #define PROMPT_STRING "[myshell]$" #define QUIT_STRING "exit\n" static char inbuf[MAX_CANON] char * g_ptr char * g_lim exter...
上傳時間: 2016-12-31
上傳用戶:colinal
資源簡介:include <stdio.h> /*標(biāo)準(zhǔn)輸入輸出定義*/ #include <stdlib.h> /*標(biāo)準(zhǔn)函數(shù)庫定義*/ #include <unistd.h> /*Unix標(biāo)準(zhǔn)函數(shù)定義*/ #include <sys/types.h> /**/ #include <sys/stat.h> /**/ #include <fcntl.h> ...
上傳時間: 2017-05-07
上傳用戶:ljt101007
資源簡介:幀緩沖#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <asm/page.h> #include <linux/fb.h> #def...
上傳時間: 2013-12-11
上傳用戶:bjgaofei
資源簡介:C++完美演繹 經(jīng)典算法 如 /* 頭文件:my_include.h */ #include <stdio.h> /* 展開C語言的內(nèi)建函數(shù)指令 */ #define PI 3.1415926 /* 宏常量,在稍后章節(jié)再詳解 */ #define circle(radius) (PI*radius*radius) /* 宏函數(shù),圓的面積 */ /* 將比較數(shù)值大小的...
上傳時間: 2014-01-17
上傳用戶:epson850
資源簡介:#include "define.h" #include <stdio.h> #include <string.h> #include <ctype.h> #include <malloc.h> FILE *fp /*////////////////////////////////////////////////////////////////////////////// This is a pretreatment. /////////////////...
上傳時間: 2015-07-16
上傳用戶:ynsnjs
資源簡介:#include <stdio.h> #include <string.h> #include <stdlib.h> #include <malloc.h> #include <math.h> #include <conio.h> struct DuLNode{ struct DuLNode *prior int data struct DuLNode *next
上傳時間: 2014-01-01
上傳用戶:caiiicc
資源簡介:一個很好用的 lcd 時鐘程序 C語言 #include<reg51.h> #include<stdio.h> //定義計時器0 的重裝值 #define RELOAD_HIGH 0x3C #define RELOAD_LOW 0xD2 //定義按鍵彈跳時間 #define DB_VAL //定義設(shè)置模式的最大時間間隔 #define TIMEOUT 200 //定...
上傳時間: 2014-12-19
上傳用戶:zukfu
資源簡介:#include <stdio.h> #define MAX 10
上傳時間: 2013-12-18
上傳用戶:talenthn
資源簡介:#include<stdio.h> struct powernode { float pi float qi int i float vi } struct powernode wg[20] struct powernode wl[20] struct linedata
上傳時間: 2013-12-29
上傳用戶:athjac
資源簡介:#include <stdio.h> #include<math.h> void pid_init() void pid_tune() void pid_setinteg() void pid_bumpless() float pid_calc() void main()
上傳時間: 2016-04-19
上傳用戶:851197153
資源簡介:#include<malloc.h> #include<limits.h> #include<stdio.h> #include<graphics.h> #include<io.h> #include<math.h> #include<process.h> #include<conio.h> #define m 100 #define OK 1 typedef int Status typedef char TElemType /*樹元素的類...
上傳時間: 2013-12-15
上傳用戶:liansi
資源簡介:#include <reg52.h> #include <stdio.h> #include <string.h> #define uchar unsigned char #define uint unsigned int #define isp_iap_byte_read 0x1 #define isp_iap_byte_program 0x2 #define isp_iap_sector_erase 0x3 #define wait_time 0x1
上傳時間: 2016-05-18
上傳用戶:agent
資源簡介:五子棋小游戲#include<stdlib.h> #include<time.h> #include<stdio.h> #include<conio.h> int chess[169]={0} /*棋盤*/ struct chess_t/*作為輔助,即是作為建意*/ { char attack /*攻防用的,0表示守,1表示攻*/ int j /*作為優(yōu)先級用*/ }chess_a...
上傳時間: 2016-05-18
上傳用戶:anng
資源簡介:溫度華氏轉(zhuǎn)變攝氏 #include <stdio.h> #include <stdlib.h> enum x {A,B,C,D,E} int main(void) { int a=73,b=85,c=66 { if (a>=90) printf("a=A等級!!\n") else if (a>=80) printf("73分=B等級!!\n") else if (a>=70) printf(...
上傳時間: 2014-11-10
上傳用戶:wpwpwlxwlx
資源簡介:溫度華氏轉(zhuǎn)變攝氏 #include <stdio.h> #include <stdlib.h> enum x {A,B,C,D,E} int main(void) { int a=73,b=85,c=66 { if (a>=90) printf("a=A等級!!\n") else if (a>=80) printf("73分=B等級!!\n") else if (a>=70) printf(...
上傳時間: 2013-12-12
上傳用戶:亞亞娟娟123
資源簡介:成績顯示三個部份abc #include<stdio.h> #include<stdlib.h> int main(void) { float gread printf("請輸入分?jǐn)?shù)\n") scanf("%f",&gread) if(gread>=80&&gread<=100) printf("成績?yōu)锳\n") else if(gread>=60&&gread<=79) { printf("...
上傳時間: 2014-01-15
上傳用戶:waizhang
資源簡介:河內(nèi)塔問題 #include<stdio.h> #include<stdlib.h> int fun_a(int) void fun_b(int,int,int,int) int main(void) { int n int option printf("題目二:河內(nèi)塔問題\n") printf("請輸入要搬移的圓盤數(shù)目\n") scanf("%d",&n) printf("...
上傳時間: 2016-12-08
上傳用戶:努力努力再努力
資源簡介:指定一個數(shù)字轉(zhuǎn)換回十進(jìn)位,八進(jìn)位,十六進(jìn)位#include <stdio.h> #include <stdlib.h> int main(void) { int number =89 printf("數(shù)字 %d\n",number) /* %d 為十進(jìn)位輸出格式*/ printf("八進(jìn)位為 %o\n",number) /* %o 為八進(jìn)位輸出格式*/ ...
上傳時間: 2013-11-29
上傳用戶:tyler
資源簡介://順序表的建立、查找、插入與刪除 #include <stdio.h> #include <malloc.h> #include <stdlib.h> #define ListSize 100 //表最大長度 //結(jié)構(gòu)定義 typedef struct SeqList { int node[ListSize] //存放表結(jié)點 int length //當(dāng)前表長度 } SeqLis...
上傳時間: 2014-01-17
上傳用戶:dongqiangqiang
資源簡介:#include <stdio.h> #include <stdlib.h> #define OK 1 #define OVERFLOW -2 typedef int status typedef struct LinkList{ //用帶表頭結(jié)點的有序鏈表表示多項式 float coef //系數(shù) int expn //指數(shù) struct LinkList *next //指向...
上傳時間: 2014-12-06
上傳用戶:1079836864
資源簡介::#include <stdlib.h>#include <stdio.h>#include <time.h> void InsertSort(int a[],int *(k1),int *(k2))//0:直接插入排序{ int i,j int temp *(k1)=0 *(k2)=0 for(i=0 i<149 i++) { temp=a[i+1] *(k2)++ ...
上傳時間: 2014-11-30
上傳用戶:362279997
資源簡介:順序棧的出棧、入棧、求棧長等基本操作 #include <stdio.h> #include <stdlib.h> #define STACKSIZE 50 typedef char DateType typedef struct
上傳時間: 2014-01-10
上傳用戶:daguda
資源簡介:#include<stdio.h> void main(void) {int n,k,derivata,a[10],i printf("n=") scanf(" d",&n) for(i=0 i<=n i++) { printf("a[ d]=",i) scanf(" d",&a[i]) } printf("k=") scanf(" d",&k) for(derivata=1 derivata<=k derivata++) { f...
上傳時間: 2017-09-17
上傳用戶:duoshen1989
資源簡介:一個經(jīng)典的socket套接字的程序!分為server和client兩個部分! 利用Csocket發(fā)送消息!!值得新手學(xué)習(xí)socket的使用!
上傳時間: 2015-03-14
上傳用戶:獨孤求源
資源簡介:感知器的VC實現(xiàn)#include "percept.h" #include "stdio.h" #include "stdlib.h"
上傳時間: 2013-12-17
上傳用戶:偷心的海盜
資源簡介:#include "stdio.h" #include "math.h" #include "malloc.h" #include "string.h" #define m 6 #define n 29 #define p 0.5
上傳時間: 2015-05-22
上傳用戶:lwwhust
資源簡介:#include "stdio.h" #include "math.h" #include "malloc.h" #include "string.h" #define m 6 #define n 29 #define p 0.5
上傳時間: 2015-05-22
上傳用戶:cc1915