The parameter to a function can be a copy of a value that is represented by variable or can be a reference to a memory space that stores value of variable. The former is referred to as pass by value and the latter is referred to as pass by reference. The difference is that when parameters are passed by value the changes made to the variable value within the function is not reflected in the caller function, but when passed as reference changes are reflected outside the called function. The structures are always passed by reference.
The size of the char and int are always dependent on the underlying operating system or firmware. This is limited to the number of address lines in the address bus. The int usually takes up a value of 2 bytes or 4 bytes. The char can take up a space of 1 or 2 bytes. […]
What are little endian and big endian types of storage? How can you identify which type of allocation a system follows?
The little endian memory representation allocates the least address to the least significant bit and the big endian is where the highest significant bit takes up the least addressed memory space. We can Identify the system’s usage by defining an integer value and accessing it as a character. int p=0x2; if(* (char *) &p == […]