Hacker News new | ask | show | jobs
by athanagor2 1071 days ago
What's the point of the empty string literal "" ?
1 comments

It's a poor man's assertion that the "lit" is indeed a string literal (such that we can get the string length using sizeof) and not a variable (of pointer type, where sizeof returns the size of the pointer not the string-buffer). If you pass a variable instead of a string literal, that will be a syntax error.