#include<stdio.h> int main(void){ int v = 315; char s[8] = ""; sprintf(s, "%04o", v); puts(s); return 0;}
Standard input is empty
0473
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!