#include <stdio.h> #include <stdlib.h>int main () {printf ("file:%s\nline:%d\ndate:%s\ Ntime:%s\n ", __file__, __line__, __date__, __time__); system ( "Pause"); return 0;} #include <stdio.h> #include <stdlib.h> #define &NBSP;CAT (x, y) x# #Yint main () { printf ("%d\n", cat (3, 4));//system ("pause");//return 0;//}//#include <stdio.h>//# include <stdlib.h>//#define &NBSP;PRINT (fomal,value) printf ("the value of " # Value " is " Fomal "", Value)//int main ()//{//int a = 10;//print ("%d", a);// System ("pause");//return 0;//}//#include <stdio.h>//#include <stdlib.h>//#define max (x, y) (×) > (Y)? (X):(Y)//int main ()//{//int a = 10;//int b = 20;//int ret = MAX (a, b);//printf ("max=%d\n", ret);//system ("pause");//return 0;//}#include <stdio.h> #include <stdlib.h> #define &NBSP;MALLOC (num,type) (type*) malloc (num*sizeof (TYPE)) Int main () {int *p = (int *) malloc (10 * sizeof (int)) ; free (p);p = null;system ("pause"); return 0;}
Some simple applications for Linux