printf() prints something to the standard output. In OnlineGDB, the output is in on the bottom, below the text editor.
You can format your output as well. Please, check the documentation that has many examples.