c语言中的变量声明

整型,数组,字符串的声明

#include<stdio.h>

int main()
{
    //整型
    int a = 100;

    //数组
    int b[2] = {1,2};

    //字符串
    char c[] = "hello word";
printf("%d\n",a); printf("%d\n",b[1]); printf("%s\n",c); }

 

posted @ 2020-07-16 15:04  wtzhang111  阅读(347)  评论(0)    收藏  举报