c - static variable used with != operator and that too not in if or any loop condition -
#include <stdio.h> int main() { static int var; var!=0; var+=1; printf("static value :%d\n",var); return 0; }
in above code var!=0
do? , if returns anything, returns?
var!=0
nothing, except comparison, not stored or used in other way . should if used comparison, not use result of comparison:
if (var!=0) { // here }