Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

c ÓïÑÔÖеĴ«ÖµÓë´«ÒýÓÃ


#include<stdio.h>
int cubeByValue(int n);
int main(){
    int number = 5 ;
    printf("The original value of number is %d\n",number);
    number = cubeByValue(number);   
    printf("The new  value of number is %d\n",number);
    return 0;
}
int cubeByValue(int n){
    return n*n ;
}
#include<stdio.h>
void cubeByReference(int *nPtr);
int main(){
    int number = 5 ;
    printf("The original value of number is %d\n",number);
    cubeByReference( &number );
    printf("The new value of number is %d\n",number);
    return 0;
}
void cubeByReference(int *nPtr){
    *nPtr = *nPtr * *nPtr ;
}


Ïà¹ØÎĵµ£º

CÖеĿɱä²ÎÊýÑо¿

Ò»£® ºÎν¿É±ä²ÎÊý
int printf( const char* format, ...);
ÕâÊÇʹÓùýCÓïÑÔµÄÈËËùÔÙÊìϤ²»¹ýµÄprintfº¯ÊýÔ­ÐÍ£¬ËüµÄ²ÎÊýÖоÍÓй̶¨²ÎÊýformatºÍ¿É±ä²ÎÊý£¨Óᱡ­¡±±íʾ£©¡£
¶øÎÒÃÇÓÖ¿ÉÒÔÓø÷ÖÖ·½Ê½À´µ÷ÓÃprintf,Èç:
printf("%d",value);
printf("%s",str);
printf("the number is %d ,st ......

C/C++Êý¾ÝÀàÐÍ(ÍøÉÏ×ÊÁÏ×ܽá)

1. cÓïÑÔÖеÄÕûÊýÀàÐÍÓÐchar, short, int, longµÈ¼¸ÖÖ, ÏÂÃæÊÇCÓïÑÔ¶ÔÿÖÖÊý¾ÝÀàÐͳ¤¶ÈµÄ¹æ¶¨:
(a). shortºÍlongÀàÐ͵ij¤¶È²»Ïàͬ
(b). intÀàÐÍͨ³£Í¬¾ßÌå»úÆ÷µÄÎïÀí×Ö³¤Ïàͬ
(c). shortͨ³£ÊÇ16bits, intͨ³£ÊÇ16bits or 32bitsÿÖÖ±àÒëÆ÷¿ÉÒÔ¸ù¾ÝÓ²¼þµÄ²»Í¬×ÔÓÉÈ·¶¨, µ«ÊÇshortºÍint±ØÐë×îÉÙÊÇ16bits, ¶ølongÀàÐͱØÐë× ......

C runtime lib Ḭ̈߳²È«

ÖÜÎ忪»á×öÍŶӳÉÔ±codereivew£¬ ÓÐͬÊÂÌá³öÁËÒ»¸ö¹ØÓÚgmtime¶àÏß³ÌÊÇ·ñ°²È«µÄÎÊÌ⣬ µ±Ê±¾õµÃ³ÌÐòLinkÁËVCµÄ¶àÏ߳̿⣬Ӧ¸Ã²»ÊÇÎÊÌâ¡£»¹ºÃ»ØÍ·ºËʵÁËһϣ¬·¢ÏÖÁ˾¹ÊÇÒ»¸öDZÔÚµÄbug¡£
³ÌÐò·ÖÔÚapplication£¨Íê³ÉÏîÄ¿Ìض¨¹¦ÄÜ£©ºÍframework£¨¿ÉÖØÓõĺËÐŦÄÜ£©Á½²¿·Ö£¬Ï̵߳ÄÆô¶¯ÓÉframeworkÍê³É¡£ appÖÐʹÓÃÁËgmtime/loc ......

ûÈ˺ÍÎÒÓй²Í¬ÓïÑÔ£¬ÒòΪÎÒѧµÄÊÇc Sharp£¡

ÌýÆðÀ´£¬ÓÐ×ÔÐÅ£¬ÓиãЦ¡£ÓÖ×ÔÐÅ£¬ÓÖ¸ãЦ¡£
Á½ÄêÇ°£¬¿¼ÈëÁËÒ»¸ö¶þÁ÷´óѧ£¬·Ç¼ÆËã»úרҵ¡£µ±³õ»³×ÅÎÞ±ÈÃÀºÃµÄÐÄÇ飬ֻÊÇÏ£ÍûÔÚѧУ¹ýµÄ¿ìÀÖЩ£¬Ñ§µÄºÃЩ£¬µ«ÊÇÓÐЩÊÂÇé×ÜÊÇÄÑÒÔÔ¤ÁÏ£¬ÎÒ×ÜÊÇÎÞ·¨ÍüÈ´ÄÇ·Ý»³ÄÔÚÕâ¸öÄ°ÉúµÄ³ÇÊУ¬ÎÒ×ÜÊÇÃÔʧÁË×Ô¼º¡£Ä¬Ä¬µÄ¶ãÔÚ×Ô¼ºµÄÊÀ½çÀïÌòóÂÉË¿Ú£¬Ô­ÒÔΪµ½Á˸öеĻ·¾³ÄÜÍüµôÒ»ÇеÄÉËÐÄ¹Ê ......

C/C++:³ÌÐòµÄÄÚ´æ·ÖÅ䷽ʽ Alvin

1.ÄÚ´æ·ÖÅ䷽ʽ
¡¡¡¡ÄÚ´æ·ÖÅ䷽ʽÓÐÈýÖÖ£º
¡¡¡¡[1]´Ó¾²Ì¬´æ´¢ÇøÓò·ÖÅä¡£ÄÚ´æÔÚ³ÌÐò±àÒëµÄʱºò¾ÍÒѾ­·ÖÅäºÃ£¬Õâ¿éÄÚ´æÔÚ³ÌÐòµÄÕû¸öÔËÐÐÆڼ䶼´æÔÚ¡£ÀýÈçÈ«¾Ö±äÁ¿£¬static±äÁ¿¡£
¡¡¡¡[2]ÔÚÕ»ÉÏ´´½¨¡£ÔÚÖ´Ðк¯Êýʱ£¬º¯ÊýÄÚ¾Ö²¿±äÁ¿µÄ´æ´¢µ¥Ôª¶¼¿ÉÒÔÔÚÕ»ÉÏ´´½¨£¬º¯ÊýÖ´ÐнáÊøʱÕâЩ´æ´¢µ¥Ôª×Ô¶¯±»ÊÍ·Å¡£Õ»ÄÚ´æ·ÖÅäÔËËãÄÚÖÃÓÚ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ