C unsigned Ó÷¨
Àý£º#define NELE(a) (sizeof(a) / sizeof(a[0]))
int main() {
char str[] = {'E', 'M', 'C'};
for (int d=-1; d<=(NELE(str)-2);d++)
printf("%c",str[d+1]);
return 0;
}
ÅжÏprintf£¨£©Êä³öµÄÊÇʲô£¬½á¹û¿ÉÄܳöºõÒâÁÏ£¬Ê²Ã´Ò²Ã»ÓÐÊä³ö£¬ÔÒòÄØ£¿ÔÒòÔÚÓÚsizeof()·½·¨·µ»ØµÄÊÇÒ»¸öunsigned intÀàÐÍ£¬¹ÊNELE(a)·µ»ØµÄÊÇÒ»¸öÎÞ·ûºÅÕûÊý£¬ÓÉÓÚCÓïÑÔµÄÓï·¨¹æ¶¨£ºµ±±í´ïʽÖдæÔÚÓзûºÅÀàÐͺÍÎÞ·ûºÅÀàÐÍʱËùÓеIJÙ×÷Êý¶¼×Ô¶¯×ª»»ÎªÎÞ·ûºÅÀàÐÍ¡£¹ÊÉÏÊö³ÌÐòÖеÄd½«×Ô¶¯±äΪÎÞ·ûºÅµÄÕûÊý£¬d±äΪÁËunsigned intÐ͵Ä×î´óÖµ¡£ËùÒÔûÓÐÈκÎÊä³ö¡£
Ïà¹ØÎĵµ£º
C/VCĿ¼²Ù×÷
Ðdz¾ ·¢±íÓÚ 2006-10-11 15:54:00
0
ÍƼö
Ò»¡¢Ä¿Â¼²Ù×÷º¯Êý½éÉÜ
ÔÚVC++µÄ“direct.h”Öж¨ÒåÁËÒÔÏÂ4¸öº¯Êý£º
int chdir(const char *); //change directory
char * getcwd(char *, int); //get current working directory
int mkdir(const cha ......
1.ÒýÑÔ ¡¡¡¡
±¾ÎĵÄд×÷Ä¿µÄ²¢²»ÔÚÓÚÌṩC/C++³ÌÐòÔ±ÇóÖ°ÃæÊÔÖ¸µ¼£¬¶øÖ¼ÔÚ´Ó¼¼ÊõÉÏ·ÖÎöÃæÊÔÌâµÄÄÚº¡£ÎÄÖеĴó¶àÊýÃæÊÔÌâÀ´×Ô¸÷´óÂÛ̳£¬²¿·ÖÊÔÌâ½â´ðÒ²²Î¿¼ÁËÍøÓѵÄÒâ¼û¡£
Ðí¶àÃæÊÔÌâ¿´ËƼòµ¥£¬È´ÐèÒªÉîºñµÄ»ù±¾¹¦²ÅÄܸø³öÍêÃÀµÄ½â´ð¡£ÆóÒµÒªÇóÃæÊÔ ......
C
ÓïÑÔËùÓи´ÔÓµÄÖ¸ÕëÉùÃ÷£¬¶¼ÊÇÓɸ÷ÖÖÉùÃ÷ǶÌ×¹¹³ÉµÄ¡£ÈçºÎ½â¶Á¸´ÔÓÖ¸ÕëÉùÃ÷ÄØ£¿ÓÒ×ó·¨ÔòÊÇÒ»¸ö¼ÈÖøÃûÓÖ³£Óõķ½·¨¡£²»¹ý£¬ÓÒ×ó·¨ÔòÆäʵ²¢²»ÊÇC
±ê×¼ÀïÃæµÄÄÚÈÝ£¬ËüÊÇ´ÓC
±ê×¼µÄÉùÃ÷¹æ¶¨ÖйéÄɳöÀ´µÄ·½·¨¡£C
±ê×¼µÄÉùÃ÷¹æÔò£¬ÊÇÓÃÀ´½â¾öÈçºÎ´´½¨ÉùÃ÷µÄ£¬¶øÓÒ×ó·¨ÔòÊÇÓÃÀ´½â¾öÈçºÎ±çʶһ¸öÉùÃ÷µÄ£¬Á½Õß¿ ......
¸Ã³ÌÐòºÜ¼òµ¥£¬¾ÍÊÇÓÃC´ÓORACLE£¬°Ñµ±Ç°ÈÕÆÚÏÔʾ³öÀ´¾ÍOK£¬×÷Ϊһ¸ö¼òµ¥µÄDEMO
£¨Ò»£©Ð´PRO*C
/*===========================================================================
* pro*c±àÒë·½·¨£º
* Ô¤±àÒë proc test.pc
* ±àÒë gcc -o test test.c $ORACLE_HOME/lib/libclntsh.so
* ×÷Õß f ......
ÏÂÃæÕâ¸ö³ÌÐòÊä³öʲô£¿
enum {false,true};
int main()
{
int i=1;
do
{
printf("%d\n",i);
i++;
if(i < 15)
continue;
}while(false);
return 0;
}
ÄãÏàÐÅô£¿Ï ......