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

How do you use a 'Local Block'?

723


please give me some tips for the placement in the TCS.

1633


What is the size of empty structure in c?

595


What is boolean in c?

611


Describe the header file and its usage in c programming?

621






State the difference between x3 and x[3].

652


What does the error 'Null Pointer Assignment' mean and what causes this error?

741


What is a shell structure examples?

590


Why do we need functions in c?

559


Write a program to generate the Fibinocci Series

663


What is hash table in c?

574


What is the Purpose of 'extern' keyword in a function declaration?

654


Is a pointer a kind of array?

602


What is the difference between scanf and fscanf?

664


How many parameters should a function have?

668