data structures using output in main() and in function (call by value methoda and in main() and in main() and in function (call by reference methodc and in main() and pointers every variable in has name and value associated with it when variable is declareda specific block of memory within the computer is allocated to hold the value of that variable the size of the allocated block depends on the data type consider the following statement int when this statement executesthe compiler sets aside bytes of memory to hold the value it also sets up symbol table in which it adds the symbol and the relative address in the memory where those bytes were set aside (note the size of integer may vary from one system to another on bit systemsinteger variable is allocated bytes while on bit systems it is allocated bytes thusevery variable in has value and also memory location (commonly known as addressassociated with it we will use terms rvalue and lvalue for the value and the address of the variablerespectively the rvalue appears on the right side of the assignment statement ( in the above statementand cannot be used on the left side of the assignment statement thereforewriting kis illegal if we writeint xyx xthenwe have two integer variables and the compiler reserves memory for the integer variable and stores the rvalue in it when we say xthen is interpreted as its rvalue since it is on the right hand side of the assignment operator thereforehere refers to the value stored at the memory location set aside for xin this case after this statement is executedthe rvalue of is also you must be wondering why we are discussing addresses and lvalues actually pointers are nothing but memory addresses pointer is variable that contains the memory location of another variable thereforea pointer is variable that represents the location of data itemsuch as variable or an array element pointers are frequently used in cas they have number of useful applications these applications includepointers are used to pass information back and forth between functions pointers enable the programmers to return multiple data items from function via function arguments pointers provide an alternate way to access the individual elements of an array pointers are used to pass arrays and strings as function arguments we will discuss this in subsequent pointers are used to create complex data structuressuch as treeslinked listslinked stackslinked queuesand graphs