C takes input character by character. I did not find any Standard Library
function that can take a word as input. So I want to write one of my own
to be used with "Self Referential Structures" of section 6.5 of K&R2. K&R2
has their own version of <getwordwhich , I think, is quite different
from what I need:
<getwordwill have following properties:
1.) If the word contains any number like "beauty1" or "win2e" it will
discard it, K&R2's <getworddoes not. My <getwordwill only take
pure-words like "beauty", "wine" etc.
2.) we can store each word by using <array of pointerspointin g to those
words and since words themselves are strings, which in
reality, are <arrays of chars>, so we will have <array of pointersto
those <arrays of chars>.
or you think using a 2D array is a better idea ?
--
my email ID is at the above address
function that can take a word as input. So I want to write one of my own
to be used with "Self Referential Structures" of section 6.5 of K&R2. K&R2
has their own version of <getwordwhich , I think, is quite different
from what I need:
<getwordwill have following properties:
1.) If the word contains any number like "beauty1" or "win2e" it will
discard it, K&R2's <getworddoes not. My <getwordwill only take
pure-words like "beauty", "wine" etc.
2.) we can store each word by using <array of pointerspointin g to those
words and since words themselves are strings, which in
reality, are <arrays of chars>, so we will have <array of pointersto
those <arrays of chars>.
or you think using a 2D array is a better idea ?
--
my email ID is at the above address
Comment