#include <stdio.h> int main() { void foo(); printf("1 "); foo(); } void foo() { printf("2 "); }
Output:
1 2
How are functions declared inside functions? Does this mean that the function foo () can only be called main ()?
Yes, you can declare, but you cannot determine. In addition, you can declare a function as many times as you want, but define only once.
Source: https://habr.com/ru/post/1524552/More articles:How do I tell the Jersey client the equivalent of @JsonIgnoreProperties (ignoreUnknown = true) for each class that it deserializes? - javaOpening a SQL file from the VS Find Results window opens a file twice in two SSMS instances - visual-studioHow to check if UVM analysis port is connected? - system-verilogP4V does not sync all files / folders - perforceHow to automatically start Google Speech Recognition on my page? - javascript"ROWID ACCESS TABLE" means an optimizer using an index or table? - performanceHow to set non-zero restriction in activerecord for ruby? - ruby-on-railsC ++ lambda return type - c ++Get lambda template parameter return value, how to simplify code? - lambdaPHP explodes and assigns it to a multidimensional array - arraysAll Articles