Skip to Main Content
Programming and Data Structures
book

Programming and Data Structures

by Ashok Kamthane
August 2009
Intermediate to advanced content levelIntermediate to advanced
604 pages
21h 39m
English
Pearson India
Content preview from Programming and Data Structures
322 Programming and Data Structures
fUE.'/
f
c -
printf ( m\n In fun OlB»%d Cm%d*,b,c);
}
OUTPUT;
In main () B= 10 C=5
In fun 0 B = ll C=4
Again In main 0 B= 12 C=3
Explanation In the above program variables V and 'c' are defined outside the main ( ) , hence
they are global. They can be called by any other function. The same variables V and 'c! are used
throughout the program. In main (), values of V and 'c' are printed.
The function fun () is called, V is incremented and 'c' is decremented. The values of V and 'c'
are printed. The control then returns to the function main ().
Again 'b' is incremented and 'c' is decremented. The values ...
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

Learning Data Structures and Algorithms

Learning Data Structures and Algorithms

Rod Stephens
Data Structures and Algorithms in C++, Second Edition

Data Structures and Algorithms in C++, Second Edition

Michael T. Goodrich, Roberto Tamassia, David M. Mount

Publisher Resources

ISBN: 9789332506343