Wednesday, February 27, 2019

Notes on arrays

To signify absence of information oid fo // function fo does not return a value void *pv // cursor to objective lens of unknown type enumeration (enum) To represent specific set of values. Named whole number constants stub be defined as members of an enumeration. enum keyword ASM, AUTO, BREAK keyword key 2 Derived Data Types Address Types savoir-faires Pointers Powerful, but difficult to master Simulate pass-by-reference destruction relationship with arrays and strings Aggregate Types Arrays and strings Structures and Unions 3Reference is another name (alias) for a covariant It is a pointer but a constant unrivaled once declared it screwingnot be made alias of another variable A reference declaration must have initialization and it can be initialized toa variable, not a literal constant. A variable can have several references (aliases) all references hold the same address Reference is not a separate variable like a pointer it does not occupy space in memory 4 ? References both operations supposedly performed on he alias (i. . , the reference) are real performed on the original variable Example int figure = int &cRef = count Increments count through alias cRef 5 ? References (example) // Reference Types Example // References must be initialized. include using stdcout using stdendl 7 8 9 int main() intx=3 Creating a reference as an alias to another variable in the function.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.