memset method in c++ code example Example: memset c++ memset(a, 0, sizeof(a)) memset(str, '#', sizeof(str));