One question of C
- From: drazet <drazet@xxxxxxxxxxx>
- Date: Wed, 31 Oct 2007 20:04:07 -0400
why the answer is 12 13 13?
[code]
#include <stdio.h>
int x;
int m1(void);
int c1(int x);
int main(void){
int x= 10;
x++;
c1(x);
x++;
m1();
printf("%d\t",x);
x++;
c1(x);
printf("%d\t",x);
m1();
printf("%d\n",x);
return 0;
}
int m1(void){
return (x+=10);
}
int c1(int x){
return (x+=1);
}
[code end]
--
A za a za fighting!
.
- Follow-Ups:
- Re: One question of C
- From: Kenneth Brody
- Re: One question of C
- From: Chris Dollin
- Re: One question of C
- From: santosh
- Re: One question of C
- From: Keith Willis
- Re: One question of C
- Prev by Date: Re: how can we check to not enter the any string or char?
- Previous by thread: how can we check to not enter the any string or char?
- Next by thread: Re: One question of C
- Index(es):