#define SOUND_SPEED 0.034; int rtt; //round trip time in microsecond double distance; distance = (double)(rtt*SOUND_SPEED)/2;
It complains erro
#define SOUND_SPEED 0.034; ^
Do not use the trailing ;
;
Actually you should never terminate a macro with a ;:
PRE11-C. Do not conclude macro definitions with a semicolon https://www.securecoding.cert.org/confluence/display/seccode/PRE11-C.+Do+not+conclude+macro+definitions+with+a+semicolon