Dec 10 2005 01:41 PM 11677 14 p[0] = 'H'; printf("%s", p);}"> main(){ char *p = "hello world"; p[0] = 'H'; printf("%s", p);} A) Compile errorB) “Hello world”C) Runtime error.D) “hello world” jbode Profile Answers by jbode Questions by jbode Jun 30th, 2010 The behavior is undefined (6.4.5.6). It may or may not result in a run-time error. sittoop Profile Answers by sittoop Questions by sittoop Feb 26th, 2009 Latest compilers will give a warning sayingwarning: deprecated conversion from string constant to ‘char*’and it is a Segmentation fault. Answer Question Select Best Answer
Dec 10 2005 01:41 PM 11677 14 p[0] = 'H'; printf("%s", p);}"> main(){ char *p = "hello world"; p[0] = 'H'; printf("%s", p);} A) Compile errorB) “Hello world”C) Runtime error.D) “hello world” jbode Profile Answers by jbode Questions by jbode Jun 30th, 2010 The behavior is undefined (6.4.5.6). It may or may not result in a run-time error. sittoop Profile Answers by sittoop Questions by sittoop Feb 26th, 2009 Latest compilers will give a warning sayingwarning: deprecated conversion from string constant to ‘char*’and it is a Segmentation fault. Answer Question Select Best Answer
jbode Profile Answers by jbode Questions by jbode Jun 30th, 2010 The behavior is undefined (6.4.5.6). It may or may not result in a run-time error.
sittoop Profile Answers by sittoop Questions by sittoop Feb 26th, 2009 Latest compilers will give a warning sayingwarning: deprecated conversion from string constant to ‘char*’and it is a Segmentation fault.