3 ms·
char theLetterC = 2["ABC"]; Wait, what? And I thought I was good with pointers... Edit: I think I got it, is it this?: "ABC" + 2 == 2["ABC"] == *(2 + "ABC")
by danlugo92 8y ago
char theLetterC = 2["ABC"];
Wait, what? And I thought I was good with pointers...
Edit: I think I got it, is it this?:
"ABC" + 2 == 2["ABC"] == *(2 + "ABC")
Right?
- deleted 8y ago[deleted]
- aasasd 8y agoI'm not a C man, but afaiu, "ABC" is syntactic sugar for a char pointer to that string. So it works like any pointer with regard to index access.