+ 2
Is it normal this code ? Why ?
Is it normal this code ? #define K(y) \ #y 2021 What will be printed if we use printf on y ?
3 Respuestas
+ 3
its macro directive in c
#define K(y) #y
as for 2021 i dont know what that does
Now if you use this in code like K(123abc)
this 123abc will be converted to string and it will be a string "123abc"
# - the has is called stringizing operator, but nobody uses macros now
+ 3
Мартин 😑🎵
But back slash \ it normal to use it without n or t
Bcause i know that \n is for break line \t for tabulation but \ without nothing i am confuse there
+ 3
Those slashes represent new line in bash
You can write
echo \
2 \
3
and this prints 2 3
its same there writing code in new lines