Programming/C++124 [C] Macro, Constant, Preprocessor /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 29-03-2017Modified : 29-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Macro, Constant, Preprocessor ------------------------------------------------------------------------------------------*/ #include #define SQUARE(x) x*xint main(void) {int.. 2017. 3. 29. [C] Macro, Constant, Preprocessor /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 29-03-2017Modified : 29-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Macro, Constant, Preprocessor ------------------------------------------------------------------------------------------*/ #include #define string "C++ Compatible C"#define.. 2017. 3. 29. [C] Memory, Calloc, Malloc, Free, Array /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 29-03-2017Modified : 29-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Memory, Malloc, Free, Array, Calloc ------------------------------------------------------------------------------------------*/ #include #include int main() {int size, i;i.. 2017. 3. 29. [C] Memory, Malloc, Free /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 29-03-2017Modified : 29-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Memory, Malloc, Free ------------------------------------------------------------------------------------------*/ #include #include int main(void) {int* a;a = (int*)malloc(.. 2017. 3. 29. [C] Memory /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 29-03-2017Modified : 29-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Memory ------------------------------------------------------------------------------------------*/ #include void fct1(int);void fct2(int); int a = 10;int b = 20; int main(.. 2017. 3. 29. [C] Struct, Union /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 28-03-2017Modified : 28-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Struct, Union------------------------------------------------------------------------------------------*/ #include #include enum days {MON, TUE, WED, THU, FRI, SAT, SUN}; i.. 2017. 3. 28. [C] Struct, Union /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 28-03-2017Modified : 28-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Struct, Union------------------------------------------------------------------------------------------*/ #include union u_data {int d1;double d2;char d3;}; int main(void) .. 2017. 3. 28. [C] Struct, Typedef, Declaration /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 28-03-2017Modified : 28-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Struct, Typedef2------------------------------------------------------------------------------------------*/ #include typedef struct Data{int data1;int data2;}Data; int mai.. 2017. 3. 28. [C] Struct, Typedef2 /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 28-03-2017Modified : 28-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Struct, Typedef2------------------------------------------------------------------------------------------*/ #include struct Data{int data1;int data2;}; typedef struct Data.. 2017. 3. 28. [C] Struct, Typedef /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 28-03-2017Modified : 28-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Struct, Typedef------------------------------------------------------------------------------------------*/ #include typedef int INT;typedef int* P_INT; typedef unsigned in.. 2017. 3. 28. 이전 1 ··· 6 7 8 9 10 11 12 13 다음