#include <stdio.h> int main(void) { int n; sscanf(" 42", "%2d", &n); printf("n = %d\n", n); return 0;}
Standard input is empty
n = 42
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!