C_×ÔÔöÓë×Ô¼õ
Ô´Âë:
# include <stdio.h>
int main()
{
int i, j, k;
int m, n, p;
i = 8;
j = 10;
k = 12;
/* ×ÔÔöÔÚ²Ù×÷Êý֮ǰ */
m = ++i;
printf("i = %d\n", i);
printf("m = %d\n", m);
/* ×Ô¼õÔÚ²Ù×÷ÊýÖ®ºó */
n = j--;
printf("j = %d\n", j);
printf("n = %d\n", n);
/* ×ÔÔö¡¢×Ô¼õµÄ»ìºÏÔËËã */
p = (++m)*(n++)+(--k);
printf("k = %d\n", k);
printf("p = %d\n", p);
return 0;
}
Ïà¹ØÎĵµ£º
ǰһƪ½²Á˼òµ¥µÄC/C++µ÷ÓÃPython½Å±¾Ä£¿é£¨.py£©¡£¼ÈÈ»ÊÇÓÃÓÚÖî¶àÓÎÏ·³ÌÐòµÄ½Å±¾ÓïÑÔ£¬Äǿ϶¨ÊÇȱ²»ÁË»¥µ÷£¨ÀñÉÐÍùÀ´£©¡£Òò´Ë£¬±¾Æª½²Ò»¸ö¼òµ¥µÄpythonµ÷ÓÃC/C++дµÄDLLÄ£¿é£¬¶ÔPython½øÐй¦ÄÜÀ©Õ¹¡£ÕâÀïдһ¸ö¼òµ¥µÄÀý×Ó£¬Ö÷Òª¾ÍΪÁËÁ˽âÏÂÕâôÓÃPythonÀ´µ÷ÓÃC/C++дµÄDLL¿â¡£ºÃÁË£¬ÇÐÈëÕýÌ⣺
Ê×ÏÈ£¬ÎÒÊÇÓÃVS2003 ......
Àý£º#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£¨£©Êä³öµÄÊÇʲô£¬½á¹û¿ÉÄܳöºõÒâÁÏ£¬Ê²Ã´Ò²Ã»ÓÐÊä³ö£¬ÔÒòÄØ£¿ÔÒò ......
b/s ÊÇ brower/server ¾ÍÊÇÓÃä¯ÀÀÆ÷(Èçie)ΪӦÓóÌÐò¿Í»§¶Ë²Ù×÷·þÎñÆ÷¡£ÕâÑùÓÃä¯ÀÀÆ÷À´²Ù×÷¼òµ¥Ò×Ó㬵«ÊǶÔÊäÈëûÓкܺõÄÑéÖ¤¡£Â߼ʵÏÖ²»¶à¡£±¾µØÖ»ÊÇÓÃÓÚ»ñÈ¡Êý¾ÝÈ»ºó´ó²¿·ÖÑéÖ¤ÐèÒªÌá½»·þÎñÆ÷À´Íê³É¡£
c/s ÊÇclient/server ¿Í»§¶ËÈí¼þÔòÊÇÒ»¸öÓµÓкܶàÂß¼ÑéÖ¤µÄÈí¼þ£¬±¾µØÑéÖ¤³É¹¦ºó²ÅÌá½»·þÎñÆ÷¡£
ÎÒÕÒµ½µÄ¸ ......
#include <stdio.h>
#define MAX 100
int a[MAX], b[MAX], count = 0;
void rData()
{ int i;
FILE *fp;
fp = fopen("C:\\100.dat", "r");
for (i=0; i<MAX; i++)
fscanf(fp, "%d,", &a[i]);
fclose(fp);
}
void main()
{ int i;
rData();
//printf("Âú×ãÌõ¼þµÄÊý= ......
C++¶Ôʱ¼äµÄ²Ù×÷Ò²ÓÐÐí¶àÖµµÃ´ó¼Ò×¢ÒâµÄµØ·½¡£×î½ü£¬ÔÚ¼¼ÊõȺÖÐÓкܶàÍøÓÑÒ²¶à´ÎÎʵ½¹ýC++ÓïÑÔÖжÔʱ¼äµÄ²Ù×÷¡¢»ñÈ¡ºÍÏÔʾµÈµÈµÄÎÊÌâ¡£ÏÂÃ棬ÔÚÕâƪÎÄÕÂÖУ¬±ÊÕß½«Ö÷Òª½éÉÜÔÚC/C++ÖÐʱ¼äºÍÈÕÆÚµÄʹÓ÷½·¨.
ͨ¹ýѧϰÐí¶àC/C++¿â£¬Äã¿ÉÒÔÓкܶà²Ù×÷¡¢Ê¹ÓÃʱ¼äµÄ·½·¨¡£µ«Ô ......