I got to know that the following program is a valid C code
char* str = "Hello" "" "World";
It automatically concatenates so the output would be Hello World.
Hello World
It's a foot gun in some cases (like forgetting a comma between strings) but I get a lot of use from this feature when writing macros
That's awesome! 🔥
Yeah but it's really weird and confusing imo.
Sounds like it would make for a good post on DEV. 😉
It is really small so I don't think it's worth an article.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I got to know that the following program is a valid C code
It automatically concatenates so the output would be
Hello World.It's a foot gun in some cases (like forgetting a comma between strings) but I get a lot of use from this feature when writing macros
That's awesome! 🔥
Yeah but it's really weird and confusing imo.
Sounds like it would make for a good post on DEV. 😉
It is really small so I don't think it's worth an article.