Skip to main content

Questions tagged [c]

For questions about the design of, or languages or features which are closely related to, C. Do keep in mind that C is related to but distinct from C++ (and there is no language called 'C/C++') and the appropriate tag should be used.

3 votes
1 answer
537 views

So, obviously, the C compiler, when compiling gotos, before inserting the jump instruction, needs to insert ...
FlatAssembler's user avatar
11 votes
4 answers
6k views

So, nearly all (or perhaps all) C-like languages require us to use curly brackets { and } when writing a do-while loop of more ...
FlatAssembler's user avatar
0 votes
1 answer
155 views

In implementing the C preprocessor, I'm considering implementing the # operator not as converting the token sequence to a string literal, but to a special "...
DannyNiu's user avatar
  • 467
-2 votes
2 answers
272 views

In the C standard, there's this: A parameter in the replacement list, ..., is replaced by the corresponding argument after all macros contained therein have been expanded. It's in Section 6.10.x.x, ...
DannyNiu's user avatar
  • 467
10 votes
4 answers
3k views

By mathematical definition, for every nonnegative integer n and every positive integer d, it holds that the modulo ...
Dannyu NDos's user avatar
  • 1,485
4 votes
1 answer
280 views

My AEC-to-WebAssembly compiler often outputs WebAssembly code doing unaligned access, which is valid in WebAssembly (it's just not guaranteed to be as fast as aligned access, and, on ARM, it usually ...
FlatAssembler's user avatar
17 votes
4 answers
3k views

C99 introduced the following keywords: _Bool _Complex _Imaginary ...
CPlus's user avatar
  • 10.5k
13 votes
2 answers
996 views

In C, most binary operators do not specify which operand will be evaluated first: ...
CPlus's user avatar
  • 10.5k
1 vote
1 answer
326 views

Paragraph 5.2.2.4 of ISO 9899:2024 says Sequenced before is an asymmetric, transitive, pair-wise relation between evaluations executed by a single thread... What does the pair-wise relation mean? Is ...
Black Monk's user avatar
26 votes
3 answers
7k views

Why do many programming languages use the symbol of two vertical parallel lines || to mean "or"? Is it because two switches connected in parallel form a ...
FlatAssembler's user avatar
-1 votes
2 answers
562 views

In computer science, compare-and-swap is known as, well, "compare-and-swap" and often abbreviated as "CAS." Why are the functions in the standard C library and C++ library named <...
Paul J. Lucas's user avatar
19 votes
4 answers
3k views

C has the behaviour of doing an implicit reference to element 0 of an array whenever you attempt to use it directly. This extends to passing arrays to/from functions - they get passed by pointer and ...
Icedude_907's user avatar
12 votes
0 answers
491 views

By the C standard and the C++ standard: $\log(0+0i) = -\infty+0 i$. $\log(0-0i) = -\infty-0 i$. $\log(-0+0i) = -\infty+\pi i$. $\log(-0-0i) = -\infty-\pi i$. However, if the floating-point complex ...
Dannyu NDos's user avatar
  • 1,485
29 votes
5 answers
4k views

In C, if you declare a struct like: struct point { int x, y; }; you also have to use ...
Paul J. Lucas's user avatar
4 votes
2 answers
420 views

The most common ones are base 2 or base 10 (aka decimal floating point). But can they have any base (like base 3, base 6, base 4 etc.)?
user avatar

15 30 50 per page