Reputation
7,368
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
17 35
Newest
 Yearling
Impact
~1.0m people reached

  • 0 posts edited
  • 0 helpful flags
  • 186 votes cast
Apr
8
revised Why do C arrays not keep track of their length?
fixed dead link
Mar
1
comment What do banks actually use as a data type for money?
We're not a bank or a core processor, but we provide an online banking platform for banks and credit unions. Internally, we store all amounts as long integers, scaled to the penny. We don't do any internal calculations, we query the bank (either through batch or realtime) and get current balances and transaction histories, so we don't need any greater precision than that.
Dec
21
awarded  Yearling
Dec
9
awarded  Guru
Oct
4
awarded  Nice Answer
Sep
28
answered What are the key differences between low-level C development and higher level OOP development?
Sep
9
awarded  Nice Answer
Aug
31
answered Design decisions while porting a non object-oriented C program to Java
Aug
11
answered Are data type declarators like “int” and “char” stored in RAM when a C program executes?
Jul
14
awarded  Good Answer
Jun
16
answered What is the difference between function() and function(void)?
May
18
awarded  Good Answer
Apr
24
comment Structuring Procedural vs OO code
@JoeP: The C language itself is simpler than C++, meaning C compilers are easier to implement and verify. There isn't a lot of magic happening under the hood in C code, so it's easier to reason through performance and size issues by simple inspection (i.e., you don't have to worry about potentially expensive constructor/destructor calls, you don't have to worry about expensive copy operations when using the postfix ++ on iterators, stuff like that).
Apr
7
comment Has pre-increment operators become that common?
@iheanyi: the value of y is the value of x prior to the increment; i.e., 1. That's perfectly clear (if you know C). Are you suggesting that the postinc shouldn't be used at all, as in x = 1; y = x; ++x;?
Mar
20
awarded  Pundit
Jan
12
comment int * vs int [N] vs int (*)[N] in functions parameters. Which one do you think is better?
@elias: int (*a)[] is an incomplete type; it's legal as long as you don't try to do anything that requires the size of the type to be known. For example, you couldn't use sizeof *a to get the size of the array in that case. Also, remember that a pointer to an N-element array is a different type from a pointer to an M-element array; they won't be interchangeable. As a matter of safety, you always want to specify the size of the array parameter.
Jan
11
answered int * vs int [N] vs int (*)[N] in functions parameters. Which one do you think is better?
Dec
22
answered Disadvantages of Pointers
Dec
21
awarded  Yearling
Dec
19
answered How can this allocation of bi-dimensional arrays work?