mardi 27 juin 2017

What does this cоde do?

I just spotted this code:

void lechk(void){
  int a = ~255;
  if(*(char*)&a) exit(-1);
}

What is it supposed to do? It seems that condition inside if is never true (because a is constant)? What is purpose of it?

Aucun commentaire:

Enregistrer un commentaire