Point out the error if any in the following program (Turbo C).
#include<stdio.h>
#include<stdarg.h>
void display(int num, ...);
int main()
{
display('A', 'a', 'b', 'c');
return}
void display(int num, ...)
{
char c; int j;
va_list ptr;
va_start(ptr, num);
for(j=j<=num; j++)
{
c = va_arg(ptr, char);
printf("%c", c);
}
}
|