How printf(“%d”,“”) work in C?

前端 未结 2 559
面向向阳花
面向向阳花 2021-01-29 00:47

I was revising some C concepts and tried this:

printf(\"%d %d %d\", \"%da\", \'a\', \'A\'); //16079992 97 65

I can understand that for a<

2条回答
  •  無奈伤痛
    2021-01-29 01:26

    A string in C is a pointer, which has a numeric value (the address). So printf is just printing the address of the string there.

提交回复
热议问题