Arrays is confusing

1999-04-08 Thread Anubhav Hanjura
Why does this code give the strange output they give? #includestdio.hmain(){ int i[4] ; int j = 0; i[j++] = j++; printf(%d %d %d %d\n,i[0],i[1],i[2],i[3]); return 0;} a n u b h a v h a n j u r a __E-Mail: [EMAIL

Re: settings

1999-04-08 Thread compiler
(I wonder if this is what you mean...) It took me a while to figure out this feature. I know that on my machine if you hold down ctrl and alt and press the minus key, that will make all your windows smaller so more will fit on the screen. You probably already know that, but jic. On Wed, 7 Apr

Re: Arrays is confusing

1999-04-08 Thread Joseph Keen
The output is actually correct for what you are telling it to do. You are telling to to assing i[j++] to j++. Now, i[j++] is the same as saying i[0] because j++ only gets incremented after it is used. You probably want something like i[++j] here. The =j++ does the same thing. So you are

Re: Arrays is confusing

1999-04-08 Thread Henk Jan Barendregt
Anubhav Hanjura wrote: #includestdio.h main() { int i[4] ; int j = 0; i[j++] = j++; /* you put the previous lin in a loop j will be increment by 2 every time the line is executed. The result will be i[0] = 0

Newbie async I/O problem

1999-04-08 Thread Victor J. McCoy
I have read HOWTOs, and in fact, I'm using some of the code. I can read, but I can't write properly. Any idea why? I can email someone a .tar.gz file to check out. I tested both, and can read fine from typing in a terminal program. Victor

Re: Arrays is confusing

1999-04-08 Thread Vitaly Fedrushkov
Good $daytime, Date: Thu, 8 Apr 1999 16:39:22 +0530 From: Anubhav Hanjura [EMAIL PROTECTED] To: UnixC [EMAIL PROTECTED] Subject: Arrays is confusing Anubhav Why does this code give the strange output they give? Pardon my ignorance, but what results did you regard as strange? It depends