printf insufficient arguments

后端 未结 2 866
野的像风
野的像风 2020-11-29 11:42

My question is about the behavior after a printf with a missing argument:

printf(\"%s blah blah %d\", int); // integer was given as argument (and not int wri         


        
2条回答
  •  不知归路
    2020-11-29 12:20

    It is undefined for the whole program.

    In fact it is undefined before even the program exists: it is undefined what the compiler itself does in presence of the text printf("%s blah blah %d", int);

提交回复
热议问题