#include<iostream>
using namespace std;
#include<string.h>
int main()
{
char*a="Venkat";
cout<<a;
return 0;
}
Hi All,
I executed above program and its working perfectly fine to my surprise.
Why compiler is not thrwoing an error as I assigned Const char* to char* in the statement.
char*a="venkat"
is it expected behaviour?
I have faced these kind of errors many times earlier....why compiler is not throwing an error in this case?