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
What is call by value in c?
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)
If null and 0 are equivalent as null pointer constants, which should I use?
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
Can i use “int” data type to store the value 32768? Why?
What is difference between class and structure?
What is the most efficient way to store flag values?
What is header file in c?
What is the collection of communication lines and routers called?
All technical questions
What is 'bus error'?
Can include files be nested?
How do I round numbers?
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
Differentiate between null and void pointers.