Sunday, October 26, 2014

Declarations

C 99 provide programmer a way to save a memory space.

struct DM {

int x,

char* z[]

}

z just a label, compilar won’t allocate a memory for that, and this declaration only could put in last of structure declaration. therefore if we need to allocate a space for this structure when we need to store a data in variable z, otherwise we will assign wrong address which is next to variable x.

 

Reference

[1] C in a nutshell

No comments:

Post a Comment

Register Transfer Level Design with Verilog (1) [ebook]

設計程式之所以有趣不外乎是它的千變萬化,同樣的結果卻有不同的寫法。 但這些不同寫法當中也並沒有分誰對誰錯,也沒有制定標準來規範何事該用何解。 這也就是我們設計者的珍貴!! [1] Primitive Instantiations 在Verilog中最基本的邏輯...