[ThinkingInC ++] 19. Exercises on C (1)

Source: Internet
Author: User

[ThinkingInC ++] 19. Exercises on C (1)

/*** Function: Creates a header file and declares a set of functions with variable parameters. The returned values include void, char, * int, and float. Create a. cpp file that contains the preceding header file and create the definition of all these functions. Each * definition should simply output the function name and parameter list, and return the type to know that it has been called. * Create another. cpp file that contains the header file and defines int main (), in which all defined * functions are called. * Time: August 15, 2014 08:18:02 * Author: cutter_point */# ifndef TEST1_H_INCLUDED # define TEST1_H_INCLUDED # include
 
  
Using namespace std; // declare a group of functions with variable parameters. The returned values include void, char, int, float // void, and void fun1 (int ); // char function declaration char fun2 (); // int function declaration int fun3 (float); // float function declaration float fun4 (char); # endif // TEST1_H_INCLUDED
 

 

 

/*** Function: Creates a header file and declares a set of functions with variable parameters. The returned values include void, char, * int, and float. Create a. cpp file that contains the preceding header file and create the definition of all these functions. Each * definition should simply output the function name and parameter list, and return the type to know that it has been called. * Create another. cpp file that contains the header file and defines int main (), in which all defined * functions are called. * Time: August 15, 2014 08:18:08 * Author: cutter_point * // * Create A. cpp file containing the header file and create the definitions of all these functions. Each definition should simply output the function name and parameter list, and return the type to know that it has been called. */# Include "test1.h" # include
 
  
Using namespace std; void fun1 (int a) {// output function name, parameter list, and return The type to know that it has been called cout <"The function fun1 (" <
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.