ProgrammingHard
printf("%d", sizeof(void *) == sizeof(int *)); What is printed?
- A. 1
- B. 0
- C. 2
- D. 4
Correct answer: A. 1
All object pointers have the same size on a given platform, so the comparison is 1 (true).
More C Programming questions
- int a[3]; int p = a; printf("%d", p + 3 > a); What is printed?
- struct { int x; int y; } p = {.y = 2, .x = 1}; printf("%d", p.x + p.y); What is printed?
- long long x = 1LL << 40 >> 39; printf("%lld", x); What is printed?
- int a, b, c; a = b = c = 5; printf("%d", a + b + c); What is printed?
- On a platform with 4-byte int, int i = 5; printf("%zu %d", sizeof(i++), i); What is printed?
- int n = 3; int p = &n; printf("%d", p p + p); What is printed?