Skip to Main Content
Data Structures Using C, 2nd Edition by Pearson
book

Data Structures Using C, 2nd Edition by Pearson

by A. K. Sharma
May 2024
Intermediate to advanced content levelIntermediate to advanced
521 pages
14h 12m
English
Pearson India
Content preview from Data Structures Using C, 2nd Edition by Pearson
52 Data Structures Using C
1.16.4 Returning Values from Functions
Earlier in this chapter, we have used functions which either return no value or integer values. The
functions that return no value are declared as void. We have been prefixing int to functions which return
integer values. This is valid but unnecessary because the default return value of a function in C is of
type int. Thus, the following two declarations are equivalent in the sense that we need not prefix int to a
function which returns an integer value.
int add (int a, int b);
add (int a, int b);
On the other hand, whenever a function returns non-integer values, the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Structures Using C

Data Structures Using C

Samir Kumar Bandyopadhyay, Kashi Nath Dey
Intermediate C Programming, 2nd Edition

Intermediate C Programming, 2nd Edition

Yung-Hsiang Lu, George K. Thiruvathukal

Publisher Resources

ISBN: 9781299831582