Home > Back-end >  Ask a question
Ask a question

Time:09-23

There is a void in brackets at the back of function and what also have no what's the difference

CodePudding user response:

#include

Void test1 ()
{
Printf (" test1 \ n ");
}

Void test2 (void)
{
Printf (" test2 \ n ");
}
Int main ()
{
Test1 (1, 2);//there will be no error
Test2 (1, 2);//an error parameter number does not match the
return 0;
}

CodePudding user response:

Add a void is that has no parameters, not to lose parameters, function features no distinction, intmain () int main (void) are carried out as the main, but added a void if the call is joined the complains
  • Related