employer cover photo
employer logo
employer logo

Tismo Technology Solutions

Est-ce votre entreprise ?

Question d’entretien chez Tismo Technology Solutions

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

Réponse à la question d'entretien

Utilisateur anonyme

14 avr. 2021

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