October 22nd, 2013, 07:04 AM
Help on simple c program
I am trying to write a program which gets a certain character from a string however i am unsure on how to do this?
October 22nd, 2013, 07:36 AM
Fetch it by index since string is a char array in C.
October 22nd, 2013, 08:17 AM
Yes but what is the base code for doing this??
Originally Posted by rodiongork
October 22nd, 2013, 10:19 AM
Any array access code that's out there.
Or are you needing to find the index (AKA "position") of a specific character, eg '@', inside a string that you are given? Then consult the string functions in strings.h, such as strchr.
Your question is far too general for us to figure out just what it is that you want to know. Examples would help. But barring that, as long as you keep your questions overly general, then you will receive answers of equal generality.
October 22nd, 2013, 10:24 AM
Thanks for the help.
Originally Posted by dwise1_aol