c-require-final-newline

c-require-final-newline is a variable defined in `cc-vars.el'.
Its value is
((c-mode . t) (c++-mode . t) (objc-mode . t))


Documentation:
*Controls whether a final newline is ensured when the file is saved.
The value is an association list that for each language mode specifies
the value to give to `require-final-newline' at mode initialization;
see that variable for details about the value. If a language isn't
present on the association list, CC Mode won't touch
`require-final-newline' in buffers for that language.

You can customize this variable.