Machine-translated by Google. Questions are authored in English.
Top

Discussion

What is the default return type if it is not specified in function definition?

  • A.void
  • B.int
  • C.double
  • D.short int

Answer: B

Correct answer: int

Under the older rules an omitted return type defaults to int. C99 removed the implicit int, so a modern compiler warns or refuses - but the default, where it is honoured, is int.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.