logo

A quirk about the sizeof operator

#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char* argv[]) { int x = 5; printf("Size: %llu\n", sizeof(++x)); printf("x is unchanged: %d\n", x); return 0; }

Courses with this lesson