Open Means Open Means
////////////////////////////////////////
#include
// Prototype
void show(int = 1, float = 2.3, long = 4);
////////////////////////////////////////
// The main() function.
////////////////////////////////////////
main()
{
    show();              // all three arguments default
    show(5);             // provide 1st argument
    show(6, 7.8);        // provide 1st two
    show(9, 10.11, 12L); // provide all three arguments
}
////////////////////////////////////////
// Display results of default arguments.
////////////////////////////////////////
void show(int first, float second, long third)
{
    std::cout << "  first = "  << first;
    std::cout << ", second = " << second;
    std::cout << ", third = "  << third << std::endl;
}

No comments

Login to post a comment

Show
  • Create an account
  • Forgot your username?
  • Forgot your password?
  • About Us
  • Faqs
  • Contact Us
  • Disclaimer
  • Terms & Conditions