Skip to main content
The 2024 Developer Survey results are live! See the results
Lundin's user avatar
Lundin's user avatar
Lundin's user avatar
Lundin
  • Member for 13 years, 6 months
  • Last seen this week
  • Stockholm, Sverige
412 votes
Accepted

This C function should always return false, but it doesn’t

367 votes
Accepted

Why is 0 < -0x80000000?

301 votes
Accepted

What is the difference between C, C99, ANSI C and GNU C?

201 votes
Accepted

Implicit type promotion rules

161 votes
Accepted

What is the benefit of terminating if … else if constructs with an else clause?

153 votes
Accepted

Initializing entire 2D array with one value

147 votes
Accepted

Correctly allocating multi-dimensional arrays

123 votes
Accepted

Endless loop in C/C++

119 votes
Accepted

Why is the .bss segment required?

116 votes

"int *nums = {5, 2, 1, 4}" causes a segmentation fault

116 votes

Should I cast the result of malloc (in C)?

111 votes
Accepted

What happens if I define a 0-size array in C/C++?

100 votes
Accepted

Why bit endianness is an issue in bitfields?

99 votes
Accepted

Why is a segmentation fault not recoverable?

94 votes

Did the author make a mistake in explaining stack and heap in C++ or am I misreading something?

93 votes
Accepted

How do I make an infinite empty loop that won’t be optimized away?

91 votes
Accepted

Left shifting with a negative shift count

89 votes
Accepted

Reasons to use (or not) stdint

83 votes
Accepted

Type conversion - unsigned to signed int/char

77 votes

Why is assigning a value to a bit field not giving the same value back?

75 votes
Accepted

In a GNU C macro envSet(name), what does (void) "" name mean?

75 votes

What does 'u' mean after a number?

67 votes

Can I hint the optimizer by giving the range of an integer?

64 votes
Accepted

Explain this implementation of malloc from the K&R book

63 votes

Freaky way of allocating two-dimensional array?

63 votes

Pass an array to a function by value

61 votes

In C, why do some people cast the pointer before freeing it?

58 votes
Accepted

How to create type safe enums?

57 votes
Accepted

C header issue: #include and "undefined reference"

54 votes

What is the difference between far pointers and near pointers?

1
2 3 4 5
193