Linux's next classic C language interview question
扔个三星炸死你
扔个三星炸死你 2017-06-26 10:59:04
0
1
1064

If you use the GCC compiler to execute the following program under Linux, what is the output result?

#include int main(){ enum color{RED,BLUE,GREEN=-2,YELLOW,PINK}; printf("%d %d",BLUE,PINK); return 0; }

I don’t understand very well. What’s the special syntax forenumtype data inClanguage?

Original question source: Several classic interview questions in C language under Linux

扔个三星炸死你
扔个三星炸死你

reply all (1)
学霸

WhenGREEN=-2, the subsequent data will be enumerated from -1, soRED=0, BLUE=1, GREEN=-2, YELLOW=-1, PINK=0

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!