#include <stdio.h> char s[]="sfksfls "; void main() { printf(s); }
Why it can work? I just input the char pointer to printf
A string literal in C is a pointer to const char. printf takes a pointer to const char (plus an optional list of additional arguments). Passing it directly or through a variable makes no difference, a pointer is a pointer, it's just a number.
const char
printf
1.4m articles
1.4m replys
5 comments
57.0k users