Consider the following program segment :#include #include void main () { char buf[100] = "hello"; strcat(buf,buf); printf(buf);}While executing this in VC++ I do not get an output . Looks like the program runs into an infinite loop. But while executing the same in Turbo C I get the output as "hellohelloh". What could be the reason behind this difference in output?
Questions by dhana80s
Showing Answers 1 - 5 of 5 Answers
Consider the following program segment :#include #include void main () { char buf[100] = "hello"; strcat(buf,buf); printf(buf);}While executing this in VC++ I do not get an output . Looks like the program runs into an infinite loop. But while executing the same in Turbo C I get the output as "hellohelloh". What could be the reason behind this difference in output?
Questions by dhana80s