| ÍøÕ¾Ê×Ò³ | Òµ½çÐÂÎÅ | С×é | Íþ¿Í | È˲Š| ÏÂÔØƵµÀ | ²©¿Í | ´úÂëÌù | ÔÚÏß±à³Ì | ±à³ÌÂÛ̳
»¶Ó­¼ÓÈëÎÒÃÇ£¬Ò»Í¬Çд輼Êõ
Óû§Ãû£º   
 
ÃÜ¡¡Â룺  
¹²ÓÐ 649 È˹Ø×¢¹ý±¾Ìû
±êÌ⣺ΪʲôֵûÓб»½»»»£¿
Ö»¿´Â¥Ö÷ ¼ÓÈëÊÕ²Ø
ÎÄÎäÁ½±ßËæ
Rank: 2
µÈ¡¡¼¶£ºÂÛ̳ÓÎÃñ
Ìû¡¡×Ó£º40
ר¼Ò·Ö£º39
×¢¡¡²á£º2009-7-23
½áÌûÂÊ£º90.91%
ÊÕ²Ø
ÒѽáÌù¡Ì  ÎÊÌâµãÊý£º20 »Ø¸´´ÎÊý£º7 
ΪʲôֵûÓб»½»»»£¿
#include"stdio.h"
main()
{
 void swap(int *p1,int *p2);
 int a,b;
 int *pointer_1, *pointer_2;
 scanf("%d,%d",&a,&b);
 pointer_1=&a;
 pointer_2=&b;
 if(a<b) swap(pointer_1,pointer_2);
 printf("\n%d,%d\n",*pointer_1,*pointer_2);




}
 void swap(int *p1,int *p2)
 {
  int *p;
  p=p1;
  p1=p2;
  p2=p;


 }
¼ÈÈ»ÔÚº¯ÊýÖеØÖ·±»½»»»ÁË ÄÇôÊä³öµÄÓ¦¸ÃºÍÊäÈëµÄÊÇÏà·´µÄѽ£¡
²»ÊǺܶ®
Çë½Ì£¡
ËÑË÷¸ü¶àÏà¹ØÖ÷ÌâµÄÌû×Ó: Ö¸Õë¡¡
2009-07-28 17:03
´ÈÉÆ
Rank: 2
À´¡¡×Ô£ºÄϾ©Å©Òµ´óѧ
µÈ¡¡¼¶£ºÂÛ̳ÓÎÃñ
Ìû¡¡×Ó£º7
ר¼Ò·Ö£º40
×¢¡¡²á£º2009-7-28
ÊÕ²Ø
µÃ·Ö:0 
cÓïÑÔµÄÊý¾Ý´«µÝÊÇ¡°°´Öµ´«ËÍ¡±£¬ÐβÎÖµµÄ¸Ä±ä²»ÄÜʹʵ²ÎµÄÖµËæÖ®¸Ä±ä¡£ÄãÖ»ÊǸıäÁËËüÔÚÄÚ´æÖеĵØÖ·£¬²¢Ã»Óиıäʵ²ÎµÄÖµ£¡£¡
2009-07-28 17:27
tinjp
Rank: 5Rank: 5
µÈ¡¡¼¶£ºÖ°ÒµÏÀ¿Í
Ìû¡¡×Ó£º52
ר¼Ò·Ö£º340
×¢¡¡²á£º2006-11-4
ÊÕ²Ø
µÃ·Ö:0 
pointer_1,p1ÊÇÁ½¸öÖ¸Õ룻pointer_2£¬p2Ò²ÊÇÁ½¸öÖ¸Õ룬Ä㽫pointer_1, pointer_2×÷Ϊ²ÎÊý´«ÈëswapÖ»ÊÇÈÃp1ºÍpointer_1¶¼Ö¸Ïòa,p2ºÍpointer_2¶¼Ö¸Ïòb,swapÖÐÖ»½»»»ÁËp1ºÍp2µÄÖ¸Ïò£¬²¢²»Äܸıäpointer_1ºÍpointer_2µÄÖ¸Ïò¡£
2009-07-28 18:03
×Ïing¡«
Rank: 4
À´¡¡×Ô£ºÖпƴó
µÈ¡¡¼¶£ºÒµÓàÏÀ¿Í
Ìû¡¡×Ó£º103
ר¼Ò·Ö£º273
×¢¡¡²á£º2008-11-25
ÊÕ²Ø
µÃ·Ö:20 
ÆäʵÄãÏëÏ룬swapº¯Êý²¢Ã»ÓÐÖ±½Ó²Ù×÷a£¬b¡£
pointer_1£¬pointer_2Ö»²»¹ýÊÇ´æ·Åa£¬bµØÖ·ÖµµÄÁ½¸öÖ¸Õë±äÁ¿°ÕÁË£¬µ±È»²»»áÓÉÐβδ«»Øʵ²Î

ΨÓÐÌìµÀºãÔÚ£¬Íù¸´Ñ­»·£¬²»Ôø¸ü¸Ä¡£¡£¡£
2009-07-28 22:29
èÊå
Rank: 2
µÈ¡¡¼¶£ºÂÛ̳ÓÎÃñ
Ìû¡¡×Ó£º15
ר¼Ò·Ö£º11
×¢¡¡²á£º2009-7-16
ÊÕ²Ø
µÃ·Ö:0 
void swap(int *p1,int *p2)
{int p;
 p=*p1;
*p1=*p2;
*p2=p;}
ÕâÑùÓ¦¸ÃÐÐÁË¡£
2009-07-28 22:43
xiaogu149162
Rank: 2
µÈ¡¡¼¶£ºÂÛ̳ÓÎÃñ
Ìû¡¡×Ó£º47
ר¼Ò·Ö£º97
×¢¡¡²á£º2009-7-16
ÊÕ²Ø
µÃ·Ö:0 
ʵ²ÎºÃûÓн»»»,Ö»ÊǵØÖ·½»»»ÁË
2009-07-29 00:05
ÎÄÎäÁ½±ßËæ
Rank: 2
µÈ¡¡¼¶£ºÂÛ̳ÓÎÃñ
Ìû¡¡×Ó£º40
ר¼Ò·Ö£º39
×¢¡¡²á£º2009-7-23
ÊÕ²Ø
µÃ·Ö:0 
ÒÔÏÂÊÇÒýÓÃtinjpÔÚ2009-7-28 18:03µÄ·¢ÑÔ£º

pointer_1,p1ÊÇÁ½¸öÖ¸Õ룻pointer_2£¬p2Ò²ÊÇÁ½¸öÖ¸Õ룬Ä㽫pointer_1, pointer_2×÷Ϊ²ÎÊý´«ÈëswapÖ»ÊÇÈÃp1ºÍpointer_1¶¼Ö¸Ïòa,p2ºÍpointer_2¶¼Ö¸Ïòb,swapÖÐÖ»½»»»ÁËp1ºÍp2µÄÖ¸Ïò£¬²¢²»Äܸıäpointer_1ºÍpointer_2µÄÖ¸ ...

 

ÕâÖÖ˵·¨Ã²ËÆÎÒÄÜÃ÷°×µã Ö»ÊÇÔÚº¯ÊýÖиıäÁËp1 p2µÄÖ¸Ïò Ô­À´µÄpointer_1, pointer_2 ²¢Ã»Óиıä
2009-07-29 07:26
ÎÄÎäÁ½±ßËæ
Rank: 2
µÈ¡¡¼¶£ºÂÛ̳ÓÎÃñ
Ìû¡¡×Ó£º40
ר¼Ò·Ö£º39
×¢¡¡²á£º2009-7-23
ÊÕ²Ø
µÃ·Ö:0 
ÒÔÏÂÊÇÒýÓôÈÉÆÔÚ2009-7-28 17:27µÄ·¢ÑÔ£º

cÓïÑÔµÄÊý¾Ý´«µÝÊÇ¡°°´Öµ´«ËÍ¡±£¬ÐβÎÖµµÄ¸Ä±ä²»ÄÜʹʵ²ÎµÄÖµËæÖ®¸Ä±ä¡£ÄãÖ»ÊǸıäÁËËüÔÚÄÚ´æÖеĵØÖ·£¬²¢Ã»Óиıäʵ²ÎµÄÖµ£¡£¡



ÕâÖÖ˵·¨Ã²ËÆ»¹ÊÇÓеãת²»¹ýÀ´¡£¡£¡£¡£¡£¡£

×îºóÁ½¾äÖеġ®Ëü¡¯Ö¸µÄÊÇ P1 P2 »¹ÊÇpointer_1 pointer_2?
°´ÕÕÎÒµÄÀí½âÓ¦¸ÃÊÇ P1 P2 °É£¿
лл´ó¼Ò£¡
2009-07-29 07:29
¿ìËٻظ´£ºÎªÊ²Ã´ÖµÃ»Óб»½»»»£¿
Êý¾Ý¼ÓÔØÖÐ...
 
¡¡¡¡¡¡



¹ØÓÚÎÒÃÇ | ¹ã¸æºÏ×÷ | ±à³ÌÖйú | Çå³ýCookies | TOP | ÊÖ»ú°æ

±à³ÌÖйú °æȨËùÓУ¬²¢±£ÁôËùÓÐȨÀû¡£
Powered by Discuz, Processed in 0.013215 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved