I am surprised that the file containing the following lines of code was successfully compiled, and the linker creates the executable. I thought that all functions except mainshould have a valid operator returnif the return type is not equal void.
main
return
void
int foo(){} double bar(){} int main(){}
What am I missing?
I thought that all functions except mainshould have a valid return statement if return type void.
Yes they should. You will get undefined behavior if they don't.
, , ; .
, .
, , undefined. , , .
Source: https://habr.com/ru/post/1530491/More articles:что означает npm install -d --save - node.jsNeed help creating JSONObject java - javaUsing @package instead of namespace in PhpDocumentor 2 - phpIterating through separate files in os.walk in Python in idiomatic mode - pythonHow to get stack cell address in visual studio 2010 c # - c #java: ссылка на.. неоднозначна, и метод method1 и method2 in... match - javaRecommendations for defining FastImageCache FICImageFormats? - iosCorrect configuration using Gulp, Mocha, Browserify to run a client-side test with server-side checks - node.jsЗагружаемый пример нормализации Inmon Enterprise Data Warehouse - data-warehouseHow to access UIImageView added to storyboard - iosAll Articles