Check out example codes for "vprintf". It will help you in understanding the concepts better.

Code Example 1

// vprintf syntax
int vprintf ( const char * format, va_list arg );

Code Example 2

/* vprintf example */
#include <stdio.h>
#include <stdarg.h>

void WriteFormatted ( const char * format, ... )
{
  va_list args;
  va_start (args, format);
  vprintf (format, args);
  va_end (args);
}

int main ()
{
   WriteFormatted ("Call with %d variable argument.\n",1);
   WriteFormatted ("Call with %d variable %s.\n",2,"arguments");

   return 0;
}

// Output:
// Call with 1 variable argument.
// Call with 2 variable arguments.

Learn ReactJs, React Native from akashmittal.com