View Single Post
  #1  
Old 04-10-2014, 01:12 AM
r00t r00t is offline
Sarnak


Join Date: Jun 2013
Posts: 330
Thumbs up C appreciation thread

C is what God programmed our universe in. Post your C appreciation, hints, tips, & tricks itt


When Bjarne Stroustrup used to talk about the free-store I always thought new was overloaded to just use malloc. Then I discovered the main difference between new and malloc(): the C function doesn't set up C++ virtual tables so you get a read violation

here's a neat trick for detecting big endian system

Code:
const union { long one; char little; } is_endian = {1}; 
if (!is_endian.little)
SELECT finger FROM hand WHERE id = 3