URL in C - Susam Pal

submited by
Style Pass
2024-03-31 15:30:05

However, the C99 standard does not mention anywhere that a URL is a valid syntactic element in C. How does this code work then?

Update on 04 Jun 2011: The puzzle has been solved in the comments section. If you want to think about the problem before you see the solutions, this is a good time to pause and think about it. There are spoilers ahead.

The code works fine because https: is a label and // following it begins a comment. In case, you are wondering if // is indeed a valid comment in C, yes, it is, since C99. Download the C99 standard, go to section 6.4.9 (Comments) and read the second point which mentions this:

Leave a Comment