I have checked out lots of sources from the internet but i cant find the exact way how to do it.

But i do found something like this:

Code:
#include <iostream> int main() { double d; cin>>d; if ( !cin.fail() ) cout<<"Valid data type"<<endl; else cout<<"Invalid data type"<<endl; return 0; }
I'm a beginner, not sure about it, but i think that is C++.

Is anyone know how to do it in C? Please help. Thanks in advanced!