gcc is throwing warning :
log:- warning: right-hand operand of comma expression has no effect [-Wunused-value] for(i=4, data; i
FYI,data is of int type which we are passing to the function which has this forloop
I tried locally to with sample c code which is running fine. Not sure what i need to change in my orig code.
#include <stdio.h>
int main (){
int i;
int data;
for (i=4, data; i<10; ++i){
printf("i valuse is %d", i);
}
I Know "," will evaluate the expression from left to right and it will check last evaluated expression and proceed accordingly. o/p:- i valuse is 4 i valuse is 5 i valuse is 6 i valuse is 7 i valuse is 8 i valuse is 9