C¿âº¯Êý(×Ö·û´®º¯Êý)
C¿âº¯Êý
×Ö·û´®º¯Êý
º¯ÊýÃû
º¯ÊýÔÐÍ
¹¦ÄÜ
·µ»ØÖµ
°üº¬Í·Îļþ
strcat
char *strcat(char *st1, char *str2)
°Ñstr2Á¬½Óµ½str1ºóÃæ
str1
string.h
strchr
char *strchr(char *str, int ch)
ÕÒ³östrÖ¸ÏòµÄ×Ö·û´®ÖеÚÒ»´Î³öÏÖ×Ö·û´®chµÄλÖÃ
Ö¸Ïò¸ÃλÖõÄÖ¸Õ룬δÕÒµ½Ôò·µ»Ø¿ÕÖ¸Õë
string.h
strcmp
int strcmp(char *str1, char *str2)
±È½ÏÁ½¸ö×Ö·û´®
str1 < str2 ·µ»Ø¸ºÊý£¬= ·µ»Ø 0£¬ < ·µ»Ø ÕýÊý
string.h
strcpy
char *strcpy(char *str1, char *str2)
°Ñstr2¿½±´µ½str1ÖÐ
str1
string.h
strlen
unsigned int strlen(char *str)
ͳ¼ÆstrÖÐ×Ö·ûµÄ¸öÊý
×Ö·û¸öÊý
string.h
strstr
char *strstr(char *str1, char *str2)
ÕÒ³östr2ÔÚstr1ÖеÚÒ»´Î³öÏÖµÄλÖÃ
Ö¸Ïò¸ÃλÖõÄÖ¸Õ룬δÕÒµ½Ôò·µ»Ø¿ÕÖ¸Õë
string.h
tolower
int tolower(int ch)
ch×Ö·û´®×ª»»ÎªÐ¡Ð´×Öĸ
ÓëchÏàÓ¦µÄСд×Öĸ
ctype.h
toupper
int toupper(int ch)
ch×Ö·û´®×ª»»Îª´óд×Öĸ
ÓëchÏàÓ¦µÄ´óд×Öĸ
ctype.h
Ïà¹ØÎĵµ£º
½ñÌì×ßÉÏ·ÉÏͻȻÓижø·¢£¬ÎÒÃÇÀÏʦһֱ¸øÎÒÃǽ²Òª´ÓC/SתÏòB/S£¬µ«ÊÇÎÒ¾õµÃʲôÊÇC/S£¬Ê²Ã´ÊÇB/S£¿Æäʵ¶¼Êǿͻ§»ú·þÎñÆ÷ģʽ°É£¡ÒÔǰ¸ù±¾Ã»ÓÐB/SµÄ¸ÅÄ¶øÈç½ñÕâ¸öB/SµÄ¸ÅÄîÔõô±äµÃÈç´ËµÄ¿äÕÅ£¬ä¯ÀÀÆ÷Ã÷Ã÷¾ÍÊÇÒ»¸ö¿Í»§¶ËÈí¼þ£¬Ö»ÊǰÑÄÇЩ¹æ·¶ºÃµÄÎı¾Òë³É¸÷ÖÖ¸÷ÑùµÄ¸ñʽ£¬Ö»ÊÇ´ó¼Ò¶¼×ñÑÁËÕâÑùµÄÒ»¸ö¹æ¶¨¾Í±ä³ÉÁËÁíÒ»ÖÖ ......
ÁËCÈ»ºóC++£¬È»ºóMFC/Windows,È»ºóÊÇC#,ÆäÖÐÊý¾ÝÀàÐͺܶ࣬ÓÉ»ù±¾ÀàÐÍÑÜÉúµÄtypedefÀàÐÍÒ²N¶à¡£ÊìÖª»ù±¾Êý¾ÝÀàÐÍÊÇÎÒÃÇÕýÈ·±í´ïʵ¼ÊÎÊÌâÖи÷ÖÖÊý¾ÝµÄǰÌᣬÒò´ËÎÒ·ÖÀà×ܽáÁËÒ»ÏÂC/C++/Windows /C#»ù±¾Êý¾ÝÀàÐÍ£¬ÒÔ±ãÈÕºó²éÔÄ¡£
ANSI C/C++»ù±¾Êý¾ÝÀàÐÍ£º
Type
Size
Ê ......
±¾ÎĽéÉÜÔÚGNU/Linux»·¾³ÏÂÒ»¸öC³ÌÐòÓÉÔ´´úÂëµ½³ÌÐò£¬µ½¼ÓÔØÔËÐУ¬×îºóÖÕÖ¹µÄ¹ý³Ì¡£Í¬Ê±ÒԴ˹ý³ÌÎªÔØÌ壬½éÉÜGNU/Linuxƽ̨ÏÂÈí¼þ¿ª·¢¹¤¾ßµÄʹÓá£
±¾ÎÄÒÔÎÒÃÇ×î³£¼ûµÄhello, world!ΪÀý£º
#include <stdio.h>
main ()
{
printf(“hello, world!\n” ......
±¾ÎĽéÉÜÔÚGNU/Linux»·¾³ÏÂÒ»¸öC³ÌÐòÓÉÔ´´úÂëµ½³ÌÐò£¬µ½¼ÓÔØÔËÐУ¬×îºóÖÕÖ¹µÄ¹ý³Ì¡£Í¬Ê±ÒԴ˹ý³ÌÎªÔØÌ壬½éÉÜGNU/Linuxƽ̨ÏÂÈí¼þ¿ª·¢¹¤¾ßµÄʹÓá£
±¾ÎÄÒÔÎÒÃÇ×î³£¼ûµÄhello, world!ΪÀý£º
#include <stdio.h>
main ()
{
printf(“hello, world!\n” ......