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
  • He very much know the answer, since any C programmer with at least a couple of weeks of experience do know the difference.

    Hint: Have you looked at the different function prototypes for the functions?

    printf = print formatted
    sprintf = string print formatted (note the extra param)

    scanf = scan formatted
    sscanf = string scan formatted (note the extra param)

    One more turn through the manual should make it obvious what the difference is.

Reply
  • He very much know the answer, since any C programmer with at least a couple of weeks of experience do know the difference.

    Hint: Have you looked at the different function prototypes for the functions?

    printf = print formatted
    sprintf = string print formatted (note the extra param)

    scanf = scan formatted
    sscanf = string scan formatted (note the extra param)

    One more turn through the manual should make it obvious what the difference is.

Children
No data