14
Why is there a difference in the output produced when the code is compiled using the two compilers GCC and Turbo C.
#include <stdio.h>
int main()
{
char *p = "I am a string";
char *q = "I am a string";
if(p==q)
{
printf("Optimized");
}
else{
printf("Change your compiler");
}
return 0;
}
I get Optimized on GCC and Change your compiler on Turbo C. Why?