What is the Difference between "printf" and "sprintf"?

Answer Posted / praveen

printf writes the data to console
sprintf writes the data to an array

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the advantages of operator overloading?

579


How can I learn dev c++ programming?

575


Explain how to initialize a const member data.

604


Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300”,”BullCart : 10”) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side

3052


Will rust take over c++?

598






What is the difference between a template and a macro?

591


How a macro differs from a template?

645


There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.

2540


In a function declaration, what does extern mean?

640


What is the full name of logo?

596


What is object oriented programming (oop)?

625


What is called array?

624


What is object file? How can you access object file?

603


Can we distribute function templates and class templates in object libraries?

597


What is the use of endl in c++?

601