Use variable-length argument lists (va_list) to write a function node *create_ssl(int N, ...)
such that a singly linked list of N nodes is created. Assume the node structure is as follows:
struct node {
struct node *next;
int data;
};
Also show how to call the function.
A va_list example:
void errmsg(int code, ...)
{
va_list ap; char *fmt;
va_start(ap, code);
if (code & FILENAME) (void)fprintf(stderr, "\"%s\"", va_arg(ap, char *));
if (code & LINENUMBER) (void)fprintf(stderr, "%d:", va_arg(ap, int));
if (code & WARN) (void)fputs("Warning:", stderr);
fmt = va_arg(ap, char *);
(void)vfprintf(stderr, fmt, ap);
va_end(ap);
}