??? 05/22/04 09:25 Read: times |
#70937 - RE: Another stringy problem Responding to: ???'s previous message |
Remember that a string of chars is simply an array of chars in 'C'. Therefore the array name is the actual address. If you add an index to that array then you need to use the & operator to get the address of the array plus the index.
char str_array[100] = "testing 123n"; printf (str_array); //will print the whole string printf(&str_array[8]); //will print 123n if you wanted to get the first character in the array: a = *str_array; or a = str_array[0]; |
Topic | Author | Date |
Another stringy problem | 01/01/70 00:00 | |
RE: Another stringy problem | 01/01/70 00:00 | |
RE: Another stringy problem | 01/01/70 00:00 | |
RE: Another stringy problem | 01/01/70 00:00 | |
RE: Another stringy problem | 01/01/70 00:00 | |
RE: Another stringy problem![]() | 01/01/70 00:00 |