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

Answer Posted / guest

prinf will print the data on to the screen.
sprintf will print the data to a buffer.

basically sprintf is used for formatting the output.

printf("%s",google);
char *p;
sprintf(p,"%s",google);

Is This Answer Correct ?    91 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are c++ storage classes?

616


How is computer programming useful in real life?

594


What is a base class?

599


What is the basic of c++?

599


Write bites in Turbo c++ Header ("Include") Files.

680






How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?

3200


How the virtual functions maintain the call up?

606


What are the advantages of c++?

589


When to use “const” reference arguments in a function?

575


Why should you learn c++?

579


What is the difference between object-oriented programming and procedural programming?

690


What is the default access level?

619


How does list r; differs from list r();?

687


Describe delete operator?

619


How do you master coding?

559