Pointer arithmetic for structs

后端 未结 5 2211
鱼传尺愫
鱼传尺愫 2021-02-07 08:02

Given a struct definition that contains one double and three int variables (4 variables in all), if p is a pointer to this struct with a value 0x1000, what value does p++ have?<

5条回答
  •  無奈伤痛
    2021-02-07 08:51

    A Increment in base address of a data type is equal to base address + sizeof(data type)

提交回复
热议问题