jeudi 26 février 2015

What happens when you add two different types together in C?



Given the following code:



int foo = 5;
int *foo_ptr = &foo;
return foo_ptr + foo;


Will the return type be a pointer or an int? And more generally, what does the compiler do when adding differing type together?




Aucun commentaire:

Enregistrer un commentaire