DEV Community

loading...

Discussion on: May 22nd, 2020: What did you learn this week?

Collapse
delta456 profile image
Swastik Baranwal

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.

Collapse
tadaboody profile image
Tomer

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

Collapse
nickytonline profile image
Nick Taylor (he/him) Author

That's awesome! 🔥

Yes, that's awesome!

Collapse
delta456 profile image
Swastik Baranwal

Yeah but it's really weird and confusing imo.

Thread Thread
nickytonline profile image
Nick Taylor (he/him) Author

Sounds like it would make for a good post on DEV. 😉

Thread Thread
delta456 profile image
Swastik Baranwal

It is really small so I don't think it's worth an article.