Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is call by value in c?

1014


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

6878


If null and 0 are equivalent as null pointer constants, which should I use?

1234


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

1171


Can i use “int” data type to store the value 32768? Why?

1194


What is difference between class and structure?

1123


What is the most efficient way to store flag values?

1197


What is header file in c?

1075


What is the collection of communication lines and routers called?

1130


All technical questions

1998


What is 'bus error'?

1163


Can include files be nested?

1123


How do I round numbers?

1017


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

1260


Differentiate between null and void pointers.

1182