There is an easier way:
string[] parts = ar.Split(' ');
The result is an array of string, split at the spaces.
For the additional requirement if splitting at ( and ) here the proposal:
First, add a "gremlin" at the end, e.g. '@', this should not be one of your watched symbols. After split at spaces you get
[0]=void
[1]=main(void)@
In this case you repeat on every string and split using first '(', iterate over the parts adding them to a new collection and adding string "(" between them. Now you have
[0]=void
[1]=main
[2]=(
[3]=void)@
After that you iterate over all parts splitting at ')', adding them to a new collection and adding string ")" between them.
Now you have
[0]=void
[1]=main
[2]=(
[3]=void
[4]=)
[5]=@
After you are done remove the 'gremlin', either from the end of the last string if it has more than 2 characters, or the whole last string.
Then you get:
[0]=void
[1]=main
[2]=(
[3]=void
[4]=)
I think you get the picture.