Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Maybe lists are compared like strings?
So what do you recommend, Ali?
Agree with Ali
Yes, that's what happening. In C the strchr function returns a pointer to char, and in an expression every value of 0 evaluates to false (including the null pointer), and any non-null value to true. The ! operator evaluates to 1 if its argument is 0, and to 0 if it's argument is not equal to 0. We need twice the ! operator to turn any non-0 argument into 1.
ISO C17 6.5.3.3
I think the first "!" is to convert the pointer that strchr returns to a number(one if its a null pointer, and zero if the strchr found the specific character), so we can actually add to "int c". And the last "!", is to convert to the right number ,because null pointer was assigned to value one...
I assumed this based on sandoy's commentary... Might not be the right answer.
e.g. https://www.geeksforgeeks.org/designated-initializers-c/
This comment is hidden because it contains spoiler information about the solution
If that's C then a string is a pointer so.. no?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution