Top "Int" questions

Common datatype in many programming languages for representing a whole number.

inheritance from str or int

Why I have problem creating a class inheriting from str (or also from int) class C(str): def __init__(self, …

python string inheritance int new-operator
Why can't I unbox an int as a decimal?

I have an IDataRecord reader that I'm retrieving a decimal from as follows: decimal d = (decimal)reader[0]; For some reason …

c# decimal int unboxing
How to properly instantiate os.FileMode

I have seen countless examples and tutorials that show how to create a file and all of them "cheat" by …

go int file-permissions
In C, why is sizeof(char) 1, when 'a' is an int?

I tried printf("%d, %d\n", sizeof(char), sizeof('c')); and got 1, 4 as output. If size of a character is …

c size char int sizeof
Are ints always initialized to 0?

Is it safe to count on ints always being initialized to 0 in Objective-C? More specifically, when an object with int …

objective-c initialization int instance-variables
R.string.value Help android notification

whats the deal with CharSequence contentTitle = R.string.value; Error cannot convert from int to CharSequence. Is there a way …

android int charsequence
C# - increment number and keep zeros in front

I need to make a 40 digit counter variable. It should begin as 0000000000000000000000000000000000000001 and increment to 0000000000000000000000000000000000000002 When I use the int …

c# int increment
convert int to char* in standard C (without itoa)

I have declared and initialized two variables as shown below: int a=5; char* str; str = (char*)calloc(255, sizeof(char)); I …

c char int itoa
Convert an integer to a 2 byte Hex value in Python

For a tkinter GUI, I must read in a Hex address in the form of '0x00' to set …

python python-2.7 int hex data-conversion
Why is int rather than unsigned int used for C and C++ for loops?

This is a rather silly question but why is int commonly used instead of unsigned int when defining a for …

c for-loop int unsigned