Skip to content

Navigation Menu

Sign in
Sign up

C11 programming

bellbind edited this page Nov 1, 2015 · 2 revisions

sizeof operator

two patterns exists:

  • sizeof variable
  • sizeof (type)

Pointer assignment from void* value is not required cast

Foo* foo = malloc(sizeof (Foo));

bool

#include <stdbool.h>
bool value = true;

variable declaration may not be gathered in block head

From C99, Declaration statement can mixed another type of statements.

Declared variable in for loop is block scope in the for block.

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /