Learn C memory addresses in 7 minutes 📬

Bro Code
Bro Code
54.6 هزار بار بازدید - 3 سال پیش - C memory address tutorial example
C memory address tutorial example explained

#C #memory #address

int main()
{
  // memory = an array of bytes within RAM (street)
  // memory block = a single unit (byte) within memory (house), used to hold some value (person)
  // memory address = the address of where a memory block is located (house address)

  char a;
  char b[1];

  printf("%d bytes\n", sizeof(a));
  printf("%d bytes\n", sizeof(b));

  printf("%p\n", &a);
  printf("%p\n", &b);

  return 0;
}
3 سال پیش در تاریخ 1400/07/14 منتشر شده است.
54,695 بـار بازدید شده
... بیشتر