python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Ternary Operator (?:) based assignment avoids type check in C
I am not able to understand why the compiler doesn't warn when assigning incompatible pointers through (?:) but does warn on direct assignment.
Compiler warns in this case:
test.c: In function ‘main’...
Rajnesh
Votes: 0
Answers: 2
The strange behavior of the `operator string()` type conversion function
I have a C class and I want to convert it to string by using the operator string() syntax, but as I wrote in the comment, something strange happens.
class C {
public:
operator string()
{
...

Cyberlin
Votes: 0
Answers: 1
How does an array appear to hold a pointer value and an element value at the same location in memory?
If I have an int array intArr[4] and get the address it’s pointing to like so
printf("%p\n", intArr,);
Then get the address of the array
printf(“%p\n”, &intArr);
Both statements return t...
user17917376
Votes: 0
Answers: 1
Why exactly can't function pointers be implicitly converted?
Rationale for C, Revision 5.10, April-2003:
It is invalid to convert a pointer to a function of one type to a pointer to a function of a
different type without a cast.
It seems that they wanted to s...
pmor
Votes: 0
Answers: 1