Don't forget to inform us :D
Type: Posts; User: std10093
Don't forget to inform us :D
Oh, that's why it didn't feel right when I was typing it.. Thanks for the correction! And SHD thanks too I guess :)
Oh, ok then :)
But array is of char type!!!! In C, you can not index an array with a letter!
I said my opinion about the approach.
But you know what? I actually don't like this approach.
Think about the problem. You need for every piece of data a corresponding counter. It's a one to one assignment (I don't know if that makes...
Partially yes :)
As said, main has to return int.
Now, I asked before, what this line does?
count1[array[i]]++;
and I say again! array is of char type, so you are indexing an array...
Well, I hope you read my last post. Post the updated code
Change main to return int as you nicely had before:)
i is a counter, thus it has to be an integer ;)
this
printf("Enter %d numbers\n", n); should be this
printf("Enter %d characters\n", n);...
while the code is
shouldn't we say count[0] to count[99]?
Or maybe I am mistaken :)
//SHD didn't do fortunately the same mistake :)