2
Reply

what is the header file used sprintf in c?

kanchan setia

kanchan setia

13y
11.6k
0
Reply

    hey Jaganathan Bantheswaran,
    i tried stdio header file bt its giving an error "declaration not found".
    can u give me its solution please...

    Header file for sprintf is stdio.h.
    #include <stdio.h>

    int main(void){
      char str[80];

      sprintf(str,"%s %d %c""one"2'3');

      printf("%s", str);
    }
    O/P:
    one 2 3