scanf() curious behaviour!

前端 未结 3 1349
执笔经年
执笔经年 2020-12-16 21:22

I recently stumbled upon a curious case(atleast for me, since I hadn\'t encountered this before)..Consider the simple code below:-

int x;
scanf(\"%d\",&x         


        
3条回答
  •  旧时难觅i
    2020-12-16 21:41

    man scanf

    [...] A sequence of white-space characters (space, tab, newline, etc.; see isspace(3)). This directive matches any amount of white space, including none, in the input.

提交回复
热议问题