© Shirish Chavan 2017

Shirish Chavan, C Recipes, https://doi.org/10.1007/978-1-4842-2967-5_5

5. Functions and Structures with Pointers

Shirish Chavan

(1)Sangli, Maharashtra, India

In this chapter, you will explore the capabilities of functions and structures with the help of pointers. You can certainly use functions and structures without pointers. However, with the use of pointers, you need fewer lines of code to perform the same tasks.

5-1. Pass Arguments by Reference to a Function

Problem

You want to pass arguments by reference to a function to set the values of the credit count of members. This credit count is represented by an integer, and it can be set either from the main() function or from a user-defined function.

Solution

Write a C program ...

Get C Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.