This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

what is the difrrent between printf & sprintf and scanf & sscanf

Hello to All

what is the different between printf & sprintf and scanf & sscanf

I read the help but i dont understand it


printf("Hello world \n");

aprintf("Hello world \n");
------------------------------

int k;
scanf("%d",k);

sscanf("%d",k);

.

Thanks = 10x

Mayer

Parents
  • "i meant what is usage of the fuction in application"

    You use it exactly as described in the manual;
    The manual even includes an example of its usage.

    http://www.keil.com/support/man/docs/c51/c51_sprintf.htm

    Have you actually bothered to look at the manual yet??

    As previously stated, this has nothing specifically to do with Keil, nor the 8051, nor embedded systems - it is perfectly straightforward, standard 'C'.
    Therefore, if you need further examples, just look in your 'C' textbook, or any other standard 'C' tutorial.

    "use it with memory or lcd or serial port other things ??"

    Yes, it could possibly find application in all those scenarios; in fact, anywhere that you want to place formatted text into a buffer = just as it says in all the Manuals, textbooks, etc...

Reply
  • "i meant what is usage of the fuction in application"

    You use it exactly as described in the manual;
    The manual even includes an example of its usage.

    http://www.keil.com/support/man/docs/c51/c51_sprintf.htm

    Have you actually bothered to look at the manual yet??

    As previously stated, this has nothing specifically to do with Keil, nor the 8051, nor embedded systems - it is perfectly straightforward, standard 'C'.
    Therefore, if you need further examples, just look in your 'C' textbook, or any other standard 'C' tutorial.

    "use it with memory or lcd or serial port other things ??"

    Yes, it could possibly find application in all those scenarios; in fact, anywhere that you want to place formatted text into a buffer = just as it says in all the Manuals, textbooks, etc...

Children
No data