Top "Literals" questions

a notation for representing fixed values in source code

What's with the integer cache maintained by the interpreter?

After dive into Python's source code, I find out that it maintains an array of PyInt_Objects ranging from int(…

python caching code-analysis literals python-internals
Scope of (string) literals

I always try to avoid to return string literals, because I fear they aren't defined outside of the function. But …

c string literals
Are string literals const?

Both GCC and Clang do not complain if I assign a string literal to a char*, even when using lots …

c string constants literals
Difference between N'String' vs U'String' literals in Oracle

What is the meaning and difference between these queries? SELECT U'String' FROM dual; and SELECT N'String' FROM dual;

sql string oracle literals string-literals
Print Integer in C/C++

I have a simple program. #include <cstdio> int main() { int num = 000012345; printf("%d\n",num); return 0; } The above …

c++ c literals octal
Is a literal NSString autoreleased or does it need to be released?

When creating a string using the following notation: NSString *foo = @"Bar"; Does one need to release foo? Or is foo …

objective-c cocoa-touch memory-management nsstring literals
C++11 operator"" with double parameter

Consider: struct str {}; str operator"" _X(long double d) { return str(); } This compiles fine with g++ 4.7.2 Wall std=c++11 but …

c++ c++11 literals
Are there uint64 literals in Go?

I'm looking at the numeric types in Go. I want to use uint64 literals. Is this possible in Go? Here's …

go long-integer literals unsigned uint64
Why does Python 3 allow "00" as a literal for 0 but not allow "01" as a literal for 1?

Why does Python 3 allow "00" as a literal for 0 but not allow "01" as a literal for 1? Is there a good reason? …

python python-3.x integer literals leading-zero
Is 0 an octal or a decimal in C?

I have read this. It's octal in C++ and decimal in Java. But no description about C? Is it going …

c language-lawyer literals octal