P178. Understanding ( sprint ) function.

 

#include<stdio.h>

void main()

{

    int i=10;

    float f=10.20;

    char c = 'c';

    char s[20];

    sprintf(s,"%d%f%c",i,f,c);

    printf("%s\n",s);

}

Comments