What is the below highlighted code intended to do ? Why don't 开发者_JAVA百科we not use the arguments at all ?
int fun( int a, int b)
{
(void) a; // <<<
(void) b; // <<<
printf("Hello World\n");
}
It's a way of preventing the compiler from warning about "unused parameters". It doesn't actually consume anything (the expression is discarded).
精彩评论