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
What are the various operations performed on stack?
what is C++ exceptional handling?
What are the advantages of using pointers in a program?
What does std :: flush do?
What are the advantages of using friend classes?
Out of fgets() and gets() which function is safe to use?
Describe linkages and types of linkages?
What is the difference between map and hashmap in c++?
What is a pointer how and when is it used?
What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard
What is the difference between public and private data members?
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
What is enum c++?
What doescout<<(0==0) print out a) 0 b) 1 c) Compiler error: Lvalue required
What is the latest c++ version?