No, s is also a pointer. This inconsistency is a real problem in C and C++.Originally Posted by jamadagni
Qt Code:
#include <stdio.h> int main() { char s[] = "hello"; printf( "%c\n", s[3] ); printf( "%c\n", *(s+3) ); return 0; }To copy to clipboard, switch view to plain text mode




Reply With Quote
Bookmarks