C Programming - Variable Number of Arguments

Exercise : Variable Number of Arguments - Point Out Errors
6.
Point out the error in the following program.
#include<stdio.h>
#include<stdarg.h>
void display(char *s, ...);
void show(char *t, ...);

int main()
{
    display("Hello", 4, 12, 13, 14, 44);
    return 0;
}
void display(char *s, ...)
{
    show(s, ...);
}
void show(char *t, ...)
{
    int a;
    va_list ptr;
    va_start(ptr, s);
    a = va_arg(ptr, int);
    printf("%f", a);
}
Error: invalid function display() call
Error: invalid function show() call
No error
Error: Rvalue required for t
Answer: Option
Explanation:
The call to show() is improper. This is not the way to pass variable argument list to a function.

7.
Point out the error in the following program.
#include<stdio.h>
#include<stdarg.h>
void varfun(int n, ...);

int main()
{
    varfun(3, 7, -11.2, 0.66);
    return 0;
}
void varfun(int n, ...)
{
    float *ptr;
    int num;
    va_start(ptr, n);
    num = va_arg(ptr, int);
    printf("%d", num);
}
Error: too many parameters
Error: invalid access to list member
Error: ptr must be type of va_list
No error
Answer: Option
Explanation:
No answer description is available. Let's discuss.