#define _crt_secure_no_warnings 1#include <stdio.h># include <stdlib.h> #include <stdarg.h>int my_printf (const char *fmt, ...) {const char *s;char c;va_list ap;//parameter list va_start (AP,&NBSP;FMT);//The FMT pointer to apwhile (*FMT ) {/*if (*fmt != ' s ' | | *fmt != ' C ') {Putchar (*fmt++); continue;} */switch (*FMT) {case ' s ': S = va_arg (ap, const char *);//take parameter for (; *s; s++)//through looping, print the string contents {Putchar (*s);} break;case ' C ': C = va_arg (Ap, char);p Utchar (c); Break;default:putchar (*fmt); break;} fmt++;} Va_end (AP);//0}int main () {char a = ' B '; my_printf ("ccc\ts!", ' B ', ' i ', ' t ', "Welcome to you"); System ("pause"); return 0;}
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/75/D1/wKioL1ZDEGyg0vQRAADuJq1DQb8578.jpg "title=" 569grdoiz5i16 ' _ (tg7qp3l.jpg "alt=" Wkiol1zdegyg0vqraadujq1dqb8578.jpg "/>
C Language: The simulation implements printf, which requires features: print ("ccc\ts!", ' B ', ' I ', ' t ', "Welcome to You");