The typeof operator returns the type of its argument, which can be an expression or a type. The language feature provides a way to derive the type from an expression. The alternate spelling of the keyword, __typeof__ , is recommended. Given an expression e , __typeof__(e) can be used anywhere a type name is needed, for example in a declaration or in a cast. A typeof construct itself is not an expression, but the name of a type. A typeof construct behaves like a type name defined using typedef , although the syntax resembles that of sizeof . The following examples illustrate its basic syntax. For an expression e : int e; __typeof__(e + 1) j; /* the same as declaring int j; */ e = (__typeof__(e)) f; /* the same as casting e = (int) f; */ Using a typeof construct is equivalent to declaring a typedef name. Given int T[2]; int i[2]; you can write __typeof__(i) a; /* all thr...