echo %errorlevel%
int d=foo();
return d;
------------------------------------------
int a[10] = {1,4,8,56,4,8,3,8,5,3};
int n = 0, i;
for(i=0;i<10;i++){ i="0;i<10;i++){">
int main(void){
int a = 5, b = 6;
if(b > 7 && (a = a + 1)){
printf("X\n");
}
printf("%d\n", a);/* 5 since b >7 is false */
getchar();
return 0;
}
--------------------------------------------
#include
int main(void){
int a[10]={1,4,9,0,4,6,3,2,5,3};
int i=0;
int j;
for(;i<10;){ i="0,j=" i="0,j=">
int main(void){
int a[5]={10,20,30,40,50};
int* p = &a[0]; //same as below */
printf("%d ", *a);
printf("%d ", *(p+0));
printf("%d ", *(a+1));
p++;
printf("%d ", *(p+2));
printf("%d ", (*p)++);
printf("%d ", *(p+2));
getchar();
return 0;
}
//answer 10 10 20 40 20 40
---------------------------------------------------------
#include
void foo(int** q){
(*q)++;
}
int main(void){
int a[5]={100,200,300,400,500};
int* p = a;
foo(&p);
printf("%d\n", *p);
return 0;
}
// comments **q =&p;
--------------------------------
#define PI 3.14159265 //It works In Borland C, don't work with VC and Lunix C
int main(void){
# ifdef sum
printf("PI is defined\n");
# elif PI == 3.14159265
printf("PI is not defined\n");
# endif
return 0;
}
No comments:
Post a Comment