Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
q.txt
Package: C.rar [view]
Upload User: harvey99
Upload Date: 2020-01-11
Package Size: 938k
Code Size: 1k
Category:
Other Books
Development Platform:
CHM
- 函数名: qsort
- 功 能: 使用快速排序例程进行排序
- 用 法: void qsort(void *base, int nelem, int width, int (*fcmp)());
- 程序例:
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int sort_function( const void *a, const void *b);
- char list[5][4] = { "cat", "car", "cab", "cap", "can" };
- int main(void)
- {
- int x;
- qsort((void *)list, 5, sizeof(list[0]), sort_function);
- for (x = 0; x < 5; x++)
- printf("%sn", list[x]);
- return 0;
- }
- int sort_function( const void *a, const void *b)
- {
- return( strcmp(a,b) );
- }