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

  • In words of one syllable YES
    You can use it for an innumerable number of things.

    The important thing is to start with what you need (IE define a problem) then look at what you have (IE what C functions that may be used to meet said need).

    I use printf to dumb data to a serial port print formated data to a graphic LCD (lots of fancy stuff processing said data underneath granted), and dump memory information (in my case contents of specific data structures). It can be used with pretty much ANYTHING that needs formated text, that is what it was designed and intended to be used for.

    The limitation of what it can be used for however is what you need to do.

    Stephen