Can a pointer to a string be used in a printf?

前端 未结 4 535
梦谈多话
梦谈多话 2021-01-31 10:23

I am thinking of something like:

#include 
#include 
#include 

int main(void) {
    //test pointer to string
    c         


        
4条回答
  •  情歌与酒
    2021-01-31 11:15

    In my experience you should get segmentation fault when you try to use %s directive with *p.

提交回复
热议问题