6 ms·
Wow, and I thought I knew C pretty well. Great post. edited to add: I really like "Modern C" and just re-checked -- no mention of the preprocessor feature! ht
by chromatin 4y ago
Wow, and I thought I knew C pretty well. Great post.
edited to add: I really like "Modern C" and just re-checked -- no mention of the preprocessor feature!
https://hal.inria.fr/hal-02383654/file/ModernC.pdf https://hal.inria.fr/hal-02383654/file/ModernC.pdf
- richbell 4y agoI think C also has the elusive "down to" operator. https://stackoverflow.com/a/1642035 https://stackoverflow.com/a/1642035
- creativemonkeys 4y ago"-->" is not an operator in the C language, it's just a way of writing the unary operator "--" and comparison operator ">" together without any whitespace between them, since whitespace is ignored by the lexer.
- creativemonkeys 4y agoHave any of you downvoters read the C grammar? There is no --> operator in C. I'll never understand some people.
- richbell 4y agoI didn't downvote you but I presume others did because the StackOverflow post I linked to essentially says the same thing.
- deleted 4y ago[deleted]
- ryandrake 4y agoI think the only remaining purpose for trigraphs is when you are at the very end of a C interview, and your amazing candidate has answered every question perfectly, and you just have to find something they might not know about--only then do you reach for the trigraphs.
- thrwyoilarticle 4y agoGasp! You mean they've heard the volatile question before?
- sidewndr46 4y agoThe register keyword is far more interesting.
- Thorrez 4y agoHow about the restrict keyword.
- WithinReason 4y agoWow, I know all these. I only recently discovered bit addressing in C though.
- mpalczewski 4y agoWhy would you do this? Some weird insecurity?
- sirmoveon 4y agoSalary negotiating leverage? The worst they feel the more likely they accept to be lowballed
- ryandrake 4y agoHaha no! When a candidate is that awesome, I sometimes get morbidly curious about whether there is actually an end to that depth of knowledge or if it just goes on forever. At that point, they already have the "HIRE" classification and I'm pretty much in awe! I love it when a candidate blows through my easy, medium and hard questions and leaves me scrambling.
- Someone 4y agoNo, that’s the next-to-last question. If they know that, you ask about digraphs <: and :> are [ and ] <% and %> are { and } %: is # (since C99, and expanded a bit later than trigraphs) ‘Unfortunately’, none of the characters used here can be coded using trigraphs, so you can’t use trigraphs to generate digraphs in source.
- Natsu 4y agoHonestly, I thought this was about a programming language called C? rather than C.
- rdlw 4y agoIn the spirit of C++ and C#, there could be a C?'1':'0'