30
Apr

string = “James”

string = “peppers”

No matter the length of string I want to grab the last character.

I want to find out the value of the last character of a string, I don't want to delete it or anything else I just want to be able to put the value into a variable and then I’ll decide what to do.


Answer:
c = right (string, 1)

Answer:
char temp = data[data.length - 1];

Book Mark it-> del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Netscape | Yahoo | BlinkList

This entry was posted on Wednesday, April 30th, 2008 at 2:29 pm and is filed under Programming. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or TrackBack URI from your own site.

Leave a reply

Name (*)
Mail (*)
URI
Comment