Write a similar function to printf()?

Questions by someshwar_goli   answers by someshwar_goli

Showing Answers 1 - 6 of 6 Answers

umakanta

  • Feb 3rd, 2007
 

Write a similar function to printf()?

  Was this answer useful?  Yes

karan

  • Mar 1st, 2007
 

hi

printf require unspecified arguments........ to write this C has inbuilt datatypes va_start(), va_list(), va_end and one more ..... every thing has specified task..

printf(char fmt , ...) // use of ellipses

{
va_list ptr;    // ptr is a pointer variable by default no need to apply *

switch(fmt)    // fmt means format s f d or anything else

case s:
va_start(ptr);
putch(ptr);

case d:

case f:
//

same for d f

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions