P179. Understanding ( sscanf ) function

 

#include<stdio.h>

void main()

{

    int i;

    float f;

    char c;

    char s[20]="1010.20c";

    sscanf(s,"%d%f%c",&i,&f,&c);

    printf("%d\n",i);

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

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

}

Comments