c printing string syntax
- by user535256
Hello guys,
Just stuck on c syntax regarding strings.
Say I have a string like (name[5]="peter";) in c say if I just wanted to print the last character of string or check the last character of the string, which in this case would be 'r' how can I do this?
The way I was thinking does not seem to work
name[5]="peter";
if(name[5]=="r")…