Hi guys
My program does (or at least should do) the following: The user enters a sentence 19 characters long, or shorter. This string is saved in str.
Code:
#include <stdio.h>
#include <conio.h>
#define length 5
void main()
{
int i=0;
char str[length];
while(((i++) < length-1) && (str[i-1]=getche())!=13)
{
}
str[i-1]='\0';
}
My question is: When I use the incrementation-operator ++ in the condition of the while, then in the second condition, (str[i-1]=getche())!=13, is the original value of i used or is the incremented value used?
Best,
Niles.