I found strange from my point of view compiler behavior, It allows assign Boolean value to * char.
char * k= false;
Why? But after assignment * char is still not initialized. Why compilers doesn’t allows assign int value?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It will be implicitly converting the boolean value
falseto an integer with value zero and as such declaring a NULL pointer. It is effectively no different fromwhich is valid syntax