what is the diff between the printf and sprintf functions??
and what is the syntax for this two functions ??

Answer Posted / jack

The printf subroutine converts, formats, and writes the
Value parameter values, under control of the Format
parameter, to the standard output stream.

The sprintf subroutine converts, formats, and stores the
Value parameter values, under control of the Format
parameter, into consecutive bytes, starting at the address
specified by the String parameter. The sprintf subroutine
places a null character (\0) at the end. You must ensure
that enough storage space is available to contain the
formatted string.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the right type to use for boolean values in c? Is there a standard type?

557


What is difference between structure and union in c?

537


Differentiate call by value and call by reference?

560


Is there any demerits of using pointer?

619


What the advantages of using Unions?

667






What is the basic structure of c?

551


Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250

1497


What is the purpose of the statement: strcat (S2, S1)?

636


How to set file pointer to beginning c?

658


what is the diffrenet bettwen HTTP and internet protocol

1383


What is meant by operator precedence?

666


What are the advantages of the functions?

600


What is identifiers in c with examples?

670


what are # pragma staments?

1619


a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

629