Yes, that should work, as long as the stuff you want it to do is enclosed in {braces}. The printf command is very simple.
Code:
printf( "The digital in is reading %d", (int)rc_dig_in01 );
When you download the code with IFI Loader, it should automatically bring up a terminal window that dissplays the printf outputs. (you can also click 'terminal window' in the menu to bring it up).