Program to write ‘printf’

May 16th, 2009  |  by  |  published in Linux Sample Programs

#include <stdio.h> #include <stdarg.h> /* minprintf: minimal printf with variable argument list */ void minprintf(char *fmt, …) { va_list ap; /* points to each unnamed arg in turn */ char *p, *sval; int ival; double dval; va_start(ap, fmt); /* make ap point to 1st unnamed arg */ for (p = fmt; *p; p++) { if […]

Subscribe

Get articles in your inbox.

Enter your email address:

Join Us

Twitter Chatter


Recommendations

Archives

Categories