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

Answer Posted / manoj

i agree with Vignesh, and one more thing i would like to
add is,

ex:
char b[100];
sprintf( b, "Formatted data: %d / %f", i, f );


In above program, in array b string "Formatted data: %d / %
f" with proper i and f value will be stored.
it will not be printed on the output screen.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you write a programmer for FACTORIAL using recursion?

614


how do you execute a c program in unix.

636


What are the key features in c programming language?

615


a program that can input number of records and can view it again the record

1484


Which header file is used for clrscr?

582






Who invented b language?

915


what will be maximum number of comparisons when number of elements are given?

1410


How to explain the final year project as a fresher please answer with sample project

469


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

662


What is the purpose of 'register' keyword?

691


What are keywords in c with examples?

604


What do you mean by c what are the main characteristics of c language?

572


What is #line used for?

580


write a c program in such a way that if we enter the today date the output should be next day's date.

1679


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

626