How to check if the C implementation is hosted in C

1 Answer

0 votes
#include <stdio.h>

int main(void)
{
    fprintf(stderr, "%d", __STDC_HOSTED__);
    
    return 0;
}
 
// 1 = hosted implementation
    
/*
run:

1

*/

 



answered Jul 29, 2017 by avibootz
...