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

CС³ÌÐò£¨Ôöɾ¸Ä²éÈ«ÃæÁ·Ï°£©

1.ÅÅÐòС³ÌÐò£ºÁ·Ï°ÅÅÐò»ù±¾Ëã·¨ºÍº¯ÊýµÄÓ¦Ó㬲¢Ìåζº¯ÊýÓ÷¨µÄºÃ´¦¡£
 #include "stdio.h"
#include "stdlib.h"
#include "string.h"
#define DATA 10
int ArrGrounp[ DATA ];
int ArrGrounp1[DATA];
#define DEFINE1 "ÇëÊäÈë10¸öÊý£º\n"
#define DEFINE2 "Âú×ãÌõ¼þµÄÊýÓУº"
#define DEFINE3 "\nÂú×ãÌõ¼þµÄÊý´Ó´óµ½Ð¡ÅÅÁÐΪ£º"
void InPut(); //ÊäÈ뺯Êý
void trans(); //ɸѡÂú×ãÌõ¼þµÄÊý×Ö
void printfData(); //ÏÔʾº¯Êý
void sort(); //½«Âú×ãÌõ¼þµÄÊý×é½øÐÐÅÅÐò
void main()
{
InPut();
trans();
printfData();
sort();
}
void InPut()
{
printf(DEFINE1);
for(int i=0;i< DATA ;i++)
{
scanf("%d",ArrGrounp[i]);
}
}
void trans()
{
int a,b,c,d,e,f;
int k=0;
for(int i=0;i< DATA ;i++)
{
a=ArrGrounp[i]/1000;
b=(ArrGrounp[i]-a*1000)/100;
c=(ArrGrounp[i]-a*1000-b*100)/10;
d=ArrGrounp[i]-a*1000-b*100-c*10;
e=b*10+d;
f=e%4;
if(f==0)
{
ArrGrounp1[k]=ArrGrounp[i];
k++;
}
}
}
void printfData()
{

printf(DEFINE2);
for(int i=0;i< DATA ;i++)
{
if(ArrGrounp1[i]==0)
break;
printf("%d\t",ArrGrounp1[i]);
}
}
void sort()
{
int temp;
for(int i=DATA-1;i>0 ;i--)
{
if(ArrGrounp1[i]==0)
continue;
for(int j=0;j<i;j++)
{
if(ArrGrounp1[j]<ArrGrounp1[j+1])
{
temp=ArrGrounp1[j];
ArrGrounp1[j]=ArrGrounp1[j+1];
ArrGrounp1[j+1]=temp;
}
}

}
printf(DEFINE3);
for(int i=0;i<DATA;i++)
{
printf("%d\t",ArrGrounp1[i]);
}
}
2.¼òµ¥µÄ²úÆ·¹ÜÀíϵͳ£¬Á·Ï°×Ö·û´®ºê¶¨ÒåºÍ½á¹¹ÌåµÄÓ¦Óá£
#include"stdio.h"
#include"stdlib.h"
#include"string.h"
#define DEFINE1 "\nÇëÊäÈë²úÆ·Ãû³Æ£º"
#define DEFINE2 "\nÇëÊäÈë¿Í»§Ãû³Æ£º"
#define DEFINE3 "\nÇëÊäÈë¶©¹ºÊýÁ¿£º"
#define DEFINE4 "\nÇëÊäÈë²úÆ·¼Û¸ñ£º"
#define DEFINE5 "\n»¹Òª¼ÌÐøÊäÈëÂð£¿<1:¼ÌÐø 2.½áÊø>£º"
#define DEFINE6 "\n²éѯ½á¹ûÈçÏ£º\n"
#define DEFINE7 "\nÇëÊäÈë²éѯ¿Í»§Ãû³Æ£º"
#define DEFINE8 "\n¿Í»§Ãû³Æ\t\t²úÆ·Ãû³Æ\t\tÊýÁ¿\t¼Û¸ñ£º\n"
#define DEFINE "\nÇëÑ¡ÔñÄúÒªÖ´ÐеIJÙ×÷£


Ïà¹ØÎĵµ£º

ÓÃCдµÄ3DÃÔ¹¬

          Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
       ´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸е쬻î»î»î£¡
         &n ......

Åú´¦Àí µ÷ÊÔC/C++ʱɾ³ýÎÞÓõÄÎļþ

@echo --------------------- ÓÃÓÚ¡¶Ò»¸ö²Ù×÷ϵͳµÄʵÏÖ¡·µÄ cmd ---------------------
@echo off
mode con cols=80 lines=60 ::ǰһ¸öÊý×Ö»ò×ÖĸΪ±³¾°É«£¬ºóÒ»¸öÊý×Ö»òÕß×ÖĸΪǰ¾°É«£¬ÏÂÃæÊÇһЩÑÕÉ«¶ÔÓ¦µÄÊý×Ö»ò×Öĸ£º
::0£½ºÚ¡¢1£½À¶¡¢2£½ÂÌ¡¢3£½Ç³ÂÌ¡¢4£½ºì¡¢5£½×Ï¡¢6£½»Æ¡¢7=°×¡¢8=»Ò¡¢9=µ­À¶¡¢A£½µ ......

Linux CÓïÑÔѧϰ±Ê¼Ç

1¡¢int    4×Ö½Ú
   long   8×Ö½Ú
   float  4×Ö½Ú
   double 8×Ö½Ú
   long double 16×Ö½Ú
2¡¢Ò»¸ö×Ö·û±äÁ¿Ö»ÄÜ´æ·ÅÒ»¸ö×Ö·û¡¢Ò»¸ö×Ö½Ú´æ·ÅÒ»¸ö×Ö½Ú
   char c;
   c = 'a';    c = '\034'   ......

¹ØÓÚC¡¢C++ÖеÄconstºÍÖ¸Õë

żȻµÄÒòËØ£¬¶ÔconstÀ´Á˵ãÐËȤ£¬×öÁËÒ»ÏÂʵÑ飺
1. Óï·¨£ºconst¡¢Ö¸Õë
       ÔÚgccÖУ¬ ¶ÔÓÚCÓïÑÔ£¬ÏÂÃæµÄÓï¾äÊǺϷ¨µÄ£º
const int a=0;
int *p=&a;
      ¶øC++ÖУ¬ÐèÒªÊÖ¹¤Ç¿ÖÆ×ª»»²ÅÄܱàÒëͨ¹ý£º
        ......

The meaning of the c in calloc

The meaning of the c in calloc was vividly discussed in comp.lang.c in October 2000 (see here), with both clear (because, unlike malloc, calloc clears the memory it returns) and count (because, unlike malloc, calloc is passed a count of elements to allocate) suggested as possible explanations, howev ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ