标签:style blog http color os art
What would happen if we compile and run this code ?
void main(){ // Option A. char str1[] = "example"; str1[1] = ‘a‘; // Option B. char* str2 = "example"; str2[1] = ‘a‘; }
This code compiles but option B will produce a run time error.
http://www.dev102.com/2008/04/28/a-programming-job-interview-challenge/
标签:style blog http color os art
原文地址:http://www.cnblogs.com/sparkles/p/3849960.html