/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby,
C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stdio.h>
#define portGET_ARGUMENT_COUNT(...) portGET_ARGUMENT_COUNT_INNER(0, __VA_ARGS__,1,0)
#define portGET_ARGUMENT_COUNT_INNER(zero, one, count, ...) count
#define CAT(a, b) a##b
#define FIRST(first, ...) first
#define SECOND(first, second, ...) second
#define IS_PROBE(...) SECOND(__VA_ARGS__, 0)
#define PROBE() ~, 1
#define NOT(x) IS_PROBE(CAT(_NOT_, x))
#define _NOT_0 PROBE()
#define BOOL(x) NOT(NOT(x))
#define HAS_ARGS(...) BOOL(FIRST(_END_OF_ARGUMENTS_ __VA_ARGS__)())
#define _END_OF_ARGUMENTS_() 0
#define IF_ELSE(condition) _IF_ELSE(BOOL(condition))
#define _IF_ELSE(condition) CAT(_IF_, condition)
#define _IF_1(...) __VA_ARGS__ _IF_1_ELSE
#define _IF_0(...) _IF_0_ELSE
#define _IF_1_ELSE(...)
#define _IF_0_ELSE(...) __VA_ARGS__
#define TENTH(_1, _2, _3, _4, _5, _6, _7, _8, _9, N, ...) N
#define portGET_ARGUMENT_COUNT_ALT(...) \
IF_ELSE(HAS_ARGS(__VA_ARGS__)) \
(TENTH(__VA_ARGS__, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))(0)
int
main ()
{
printf ("%d\n", portGET_ARGUMENT_COUNT ());
printf ("%d\n", portGET_ARGUMENT_COUNT (1));
printf ("%d\n", portGET_ARGUMENT_COUNT (1, 2));
printf ("%d\n", portGET_ARGUMENT_COUNT_ALT ());
printf ("%d\n", portGET_ARGUMENT_COUNT_ALT (1));
printf ("%d\n", portGET_ARGUMENT_COUNT_ALT (1, 2));
return 0;
}