if U given input as gujarat........ the scanf will accept inputs as
char's.....but there s an ^ which means ex-or operation should be
performed regular check of existance of any char of {india}...
untill it get's the existance then it will stop the input
getting..........finally it prints as guj

On 7/26/11, siva viknesh <sivavikne...@gmail.com> wrote:
> main()
> {
>
> char str[80];
> strcpy(str,"junk");
> scanf("%[^india]",str);
> printf("%s",str);
>
>
> }
>
> ...input is gujarat.........output is guj.....plz explain how?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to