I'm working on some C code. In one of .c files I can see something like:
char* test = ("someChar", "someChar2", 3);
When I print out this variable, I get "3" on my screen.
What is happening in this part of code? Why do I get 3 as a result of printing out this char*? I am the most curious about this ("someChar", "someChar2", 3)
expression.
EDIT(after the issue has been resolved):
What made me scratch my head was also the fact, that there are two chars and one int in this expression.
If we use printf("%u", test)
we can get this number, but this code definitely doesn't look clean and I believe this is not an elegant way of assigning number to char*.