4 ms·
And what does it mean there? (automatic storage duration)
by volta83 6y ago
And what does it mean there? (automatic storage duration)
- tirrex 6y agoDo you mean automatic type deduction? Edit : I know it’s also storage specifier but it also does type deduction here, hope I’m not confused with the terminology
- volta83 6y agoIt doesn't do type deduction there. In original C you could declare variables without a type, and these variables with auto have no type. So this "auto" is essentially saying "this variable without a type uses automatic storage". That's a completely different language feature from "deduce the type of this variable".
- nix-zarathustra 6y agoNo, it doesn't do type deduction. Without specifying the type, it assumes a type of int. Everything in C revolves around ints.
- jcelerier 6y agohere it means automatic storage duration
- jstanley 6y agoIt means it lives on the stack, so it "exists" until the function returns.
- wruza 6y agoThat is true, but more nuanced. https://www.tutorialspoint.com/cprogramming/c_storage_classes.htm https://www.tutorialspoint.com/cprogramming/c_storage_classe...