The solution is not omitting the cast. Typecasting a literal is an allowed operation in C.