C Pocket Reference by Peter Prinz & Ulla Prinz
Author:Peter Prinz & Ulla Prinz
Language: eng
Format: epub
ISBN: 9780596103965
Publisher: O'Reilly Media, Inc.
Published: 2009-03-31T16:00:00+00:00
After reading out the argument list, the function should invoke the va_end macro before returning control to the caller. The only parameter of va_end is the arglist object.
Following is an example of a function, named max, that accepts a variable number of arguments:
// Determine the maximum of a number of positive integers. // Parameters: a variable number of positive values of // type unsigned int. The last argument must be 0. // Return value: the maximum of the arguments #include <stdarg.h> unsigned int max( unsigned int first, ... ) { unsigned int maxarg, arg; va_list arglist; // The optional-argument // list object va_start( arglist, first ); // Set arglist to deliver // the first optional // argument arg = maxarg = first; while ( arg != 0 ) { arg = va_arg( arglist, unsigned );// Get an argument if ( arg > maxarg ) maxarg = arg; } va_end( arglist ); // Finished reading the // optional arguments return maxarg; }
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12571)
Hello! Python by Anthony Briggs(9916)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9796)
The Mikado Method by Ola Ellnestam Daniel Brolund(9779)
Dependency Injection in .NET by Mark Seemann(9340)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8299)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7082)
Microservices with Go by Alexander Shuiskov(6850)
Practical Design Patterns for Java Developers by Miroslav Wengner(6769)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6708)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6416)
Angular Projects - Third Edition by Aristeidis Bampakos(6114)
The Art of Crafting User Stories by The Art of Crafting User Stories(5644)
NetSuite for Consultants - Second Edition by Peter Ries(5576)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5381)
Kotlin in Action by Dmitry Jemerov(5065)
