Is this possible to assign a NaN to a double or float in C/C++? Like in JavaScript you do: a = NaN. So later you can chec
NaN
double
float
a = NaN
yes, by the concept of pointer you can do it like this for an int variable:
int *a; int b=0; a=NULL; // or a=&b; for giving the value of b to a if(a==NULL) printf("NULL"); else printf(*a);
it is very simple and straitforward. it worked for me in Arduino IDE.