Pergunta de entrevista da empresa Tismo Technology Solutions

Write a function to find size of variable without using the library function sizeof()

Resposta da entrevista

Sigiloso

14 de abr. de 2021

Use pointer arithmatic int a = 3 ; char* p1, *p2 ; p1 = (char*)&a ; p2 = (char*)((&a) + 1) ; size = p2 - p1