What would happen if we compile and run this code ?app
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.ide
http://www.dev102.com/2008/04/28/a-programming-job-interview-challenge/this