Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdarg.h>
  3.  
  4. void myPrinter(const char *fmt,...);
  5. int main(void) {
  6.  
  7.  
  8.  
  9. myPrinter("dcf",5, 'h',5.5);
  10.  
  11. }
  12.  
  13. void myPrinter(const char *fmt,...) {
  14. int a=5;
  15. char b;
  16. b= 'h';
  17. double c=5.5;
  18. va_list list;
  19. va_start(list,fmt);
  20. printf(fmt,list);
  21. printf("%d\n%c\n%lf\n",a,b, c);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement