find size of array without using sizeof() function

on internet i found tht above mention method works fine only for int type of array but if array of ptr is there or other case it wont work,there people r suggesting to use array container and using its function size but i m not getting it can nyone explain it with the code…

//