M
M
Mishka_Sev2020-07-14 03:46:22
C++ / C#
Mishka_Sev, 2020-07-14 03:46:22

Can't functions be nested in C?

I'm reading a textbook from someone Batur on C:
5f0d000fc6617478628629.jpeg

It says that functions cannot be nested, is it true?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2020-07-14
@Mishka_Sev

According to the language standards, they can't. But there are extensions (in particular, for gcc) that allow you to define functions nested in other functions.
What for? Nested functions are lambdas, which were before C++ lambdas.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question