In this paper, we give a representation of the average of complete joint weight enumerators of two linear codes of length n over F q and Z k in terms of the compositions of n and their distributions in the codes. We also obtain a generalization of the representation for the average of g-fold complete joint weight enumerators of codes over F q and Z k . Finally, the average of intersection numbers of a pair of Type III (resp. Type IV) codes, and its second moment are found.