- #1
anonim
- 40
- 2
- Homework Statement
- Breaking the string into words
- Relevant Equations
- -
C:
#include<stdio.h>
int main(){
char str[]="My first book";
char *a,*b,*c;
sscanf("%s %s %s",a,b,c);
printf("a=%s b=%s c=%s",a,b,c);
}
I want the output: a= My b=first and c=book. But it does not work, why?