I have to assign memory to a 3D array using a triple pointer.
#include int main() { int m=10,n=20,p=30; char ***z; z = (char***)
You want sizeof(char) not sizeof(char**) as the latter will give you the size of a pointer which on most modern systems will be 4 bytes instead of the 1 you're expecting.
sizeof(char)
sizeof(char**)