N
Nishu
Hi All,
My Aim here is to increment lArray whether control goes inside if
statement or not. Is this a portable step and C guarantees that lArray
must be incremented?
Thanks,
Nishu
#include<stdio.h>
int main(void)
{
int i = 7;
int array[] = {0,1,1,0,1,1,0};
int* lArray;
lArray = array;
while(i--)
{
if(*lArray++) /* Is this a portable step? */
{
printf("enters in if loop\n");
}
}
return 0;
}
My Aim here is to increment lArray whether control goes inside if
statement or not. Is this a portable step and C guarantees that lArray
must be incremented?
Thanks,
Nishu
#include<stdio.h>
int main(void)
{
int i = 7;
int array[] = {0,1,1,0,1,1,0};
int* lArray;
lArray = array;
while(i--)
{
if(*lArray++) /* Is this a portable step? */
{
printf("enters in if loop\n");
}
}
return 0;
}