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

Answer Posted / vignesh1988i

the printf and sprintf functions are used to output to the
screen.....
in printf... just we can print the necessary things as
we wanted
SYNTX is:: printf("format specifiers..(%d or %c
etc)",list of agruments..(arg1,arg2... arg n);
hrewr this function directly output whatever you are giving
inside ....
but sprintf is called Stream printf... where it will store
whatever we output to the screen in an array (ie..stream)
and then output to the screen;;;

sprintf(array base address,"format specifications",variables);

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does int main () mean?

755


how to write optimum code to divide a 50 digit number with a 25 digit number??

2969


where are auto variables stored? What are the characteristics of an auto variable?

822


Why c is called a mid level programming language?

810


What is the difference between single charater constant and string constant?

846


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

834


Can you write the function prototype, definition and mention the other requirements.

873


What are the types of variables in c?

764


Explain b+ tree?

824


Explain void pointer?

787


Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.

2914


What is a pointer on a pointer in c programming language?

839


Write a program on swapping (100, 50)

856


The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?

889


will u please send me the placement papers to my mail???????????????????

1606