Structures and Functions We know that the functions are the basic building blocks of a C programs. So, it is natural for C language to support passing structures as parameters in function. We pass a copy of the entire structure to the called functions. Since the function is working on a copy of the structures, any changes to structure members within the function are not reflected in the original structures. The syntax for passing the structure variable as a parameters is shown below: 1 2 3 4 5 6 7 return–type function–name(struct structname var) { —— —— —— return expressions;
The post How to access variables in structures using functions appeared first on Coding Security.
How to access variables in structures using functions
read more
Tidak ada komentar:
Posting Komentar