#include <stdio.h></p><p>int main()<br />{<br /> char *str[] = {"welcome", "to", "fortemedia", "nanjing"};<br /> char **p = str + 1;</p><p> str[0] = ( *p++ ) + 2;<br /> str[1] = * ( p + 1 );<br /> str[2] = p[1] + 3;<br /> str[3] = p[0] + ( str[2] - str[1] );</p><p> printf ( "%s/n", str[0] );<br /> printf ( "%s/n", str[1] );<br /> printf ( "%s/n", str[2] );<br /> printf ( "%s/n", str[3] );<br /> return 0;<br />}//這種風格是ansi</p><p>#include <stdio.h></p><p>int main() {<br /> char *str[] = {"welcome", "to", "fortemedia", "nanjing"};<br /> char **p = str + 1;</p><p> str[0] = ( *p++ ) + 2;<br /> str[1] = * ( p + 1 );<br /> str[2] = p[1] + 3;<br /> str[3] = p[0] + ( str[2] - str[1] );</p><p> printf ( "%s/n", str[0] );<br /> printf ( "%s/n", str[1] );<br /> printf ( "%s/n", str[2] );<br /> printf ( "%s/n", str[3] );<br /> return 0;<br />}//這種風格叫K&R</p><p>#include <stdio.h></p><p>int main()<br />{<br /> char *str[] = {"welcome", "to", "fortemedia", "nanjing"};<br /> char **p = str + 1;</p><p> str[0] = ( *p++ ) + 2;<br /> str[1] = * ( p + 1 );<br /> str[2] = p[1] + 3;<br /> str[3] = p[0] + ( str[2] - str[1] );</p><p> printf ( "%s/n", str[0] );<br /> printf ( "%s/n", str[1] );<br /> printf ( "%s/n", str[2] );<br /> printf ( "%s/n", str[3] );<br /> return 0;<br />}//這種風格叫gnu</p><p>#include <stdio.h></p><p>int main()<br />{<br /> char *str[] = {"welcome", "to", "fortemedia", "nanjing"};<br /> char **p = str + 1;</p><p> str[0] = ( *p++ ) + 2;<br /> str[1] = * ( p + 1 );<br /> str[2] = p[1] + 3;<br /> str[3] = p[0] + ( str[2] - str[1] );</p><p> printf ( "%s/n", str[0] );<br /> printf ( "%s/n", str[1] );<br /> printf ( "%s/n", str[2] );<br /> printf ( "%s/n", str[3] );<br /> return 0;<br />}//這種風格叫linux<br />//參見astyle , 選那種風格,都一樣,和你項目組保持一致就行。<br />