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

C_¸÷ÖÖÊý×éµÄ³õʼ»¯ÊµÀý

 Ô´Â룺
# include <stdio.h>
 
int main()
{
    /* Óгߴç */
    /* һάÕûÐÎÊý×é³õʼ»¯ */
    int  array1[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
 
    /* һά×Ö·ûÐÍÊý×é³õʼ»¯£¬×îºóÒ»¸öÔªËØ×Ô¶¯Ìí¼ÓΪ‘/0’ */
    char array2[13] = "How are you!";    /* ·½Ê½Ò» */
    char array3[13] = {'H','o','w',' ','a','r','e',' ','y','o','u','!'};    /* ·½Ê½¶þ */
 
    /* ¶þάÕûÐÎÊý×é³õʼ»¯ */
    int array4[4][4] = 
    {
        12, 18,  6, 25,
        23, 10, 32, 16,
        25, 63,  1, 63,
         0,  0, 27, 98
    };    /* ¾ØÕóµÄÐÎʽ */
 
    /* Î޳ߴç */
    /* һά×Ö·ûÐÍÊý×é³õʼ»¯ */
    char array5[] = "How are you!";
    int array6[][2] = {
        { 1,50},
        {45, 2},
        { 2, 0},
        {12,32},
        {42,33},
        {15,18}
    };
    return 0;
}


Ïà¹ØÎĵµ£º

C/C++ÖеÄÄÚ´æ²¹Æë»úÖÆ

      ÔÚCÓïÑÔÖУ¬½á¹¹ÊÇÒ»ÖÖ¸´ºÏÊý¾ÝÀàÐÍ£¬Æä¹¹³ÉÔªËؼȿÉÒÔÊÇ»ù±¾Êý¾ÝÀàÐÍ£¨Èçint¡¢long¡¢floatµÈ£©µÄ±äÁ¿£¬Ò²¿ÉÒÔÊÇһЩ¸´ºÏÊý¾ÝÀàÐÍ£¨ÈçÊý×é¡¢½á¹¹¡¢ÁªºÏµÈ£©µÄÊý¾Ýµ¥Ôª¡£ÔڽṹÖУ¬±àÒëÆ÷Ϊ½á¹¹µÄÿ¸ö³ÉÔ±°´Æä×ÔÈ»¶Ô½ç£¨alignment£©Ìõ¼þ·ÖÅä¿Õ¼ä¡£¸÷¸ö³ÉÔ±°´ÕÕËüÃDZ»ÉùÃ÷µÄ˳ÐòÔÚÄÚ´æÖÐ˳Ðò´ ......

C_ÅжÏÓï¾äifÓëelseµÄǶÌ×ʹÓÃ

 Ô´Âë:
# include <stdio.h>
 
int main()
{
    /* sex´ú±íÊäѪÕßµÄÐÔ±ð£¬weight´ú±íÊäѪÕßµÄÌåÖØ£¬cubage´ú±íÊäѪÁ¿ */
    int sex, weight, cubage;
    printf("Çë¸ø³öÊäѪÕßµÄÐÔ±ð£¨Å®ÐÔΪ¸ºÊý£©ºÍÌåÖØ£º(ÓöººÅ¸ô¿ª)");
 &nbs ......

C_ʹÓÃһάÊý×éʵÏÖÑ¡ÔñÅÅÐò·¨

 Ô´Â룺
/* ʹÓÃÑ¡Ôñ·¨ÅÅÐò */
# include <stdio.h>
 
int main()
{
    int i, j, min, temp;
    /* ¶¨ÒåÒ»¸öÕûÐ͵ÄһάÊý×é */
    int array[10];
    /* ÊäÈëÊý¾Ý */
    printf("Please input ten integ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ