int a; -- variable definition
"int a" -- string literal
a string constant
C language: int (but C is NOT a .net language) C# language: object or System.Object
data-type
Literals are either numeric types (integers and floating point types), or character types. int i = 42; // literal integer double pi = 3.14; // literal floating point char c = 'x'; // literal character char s[] = "Hello world"; // literal string Note that you cannot take the address of a literal since there's no way to refer to it.
Example: int *p= (int *)-1; *p= 0;
int a = 1 + 2; ---------- int a = 1; int b = 2; a += b;
2L is the literal constant for a long (int) type with the value 2.
int foo (void); void bar (int);
int pallindrom(int p){ /*write all logic*/ }
printf ("sizeof (int) is %d bytes", (int)sizeof (int)); Most likely it will be 2 or 4.
* <int>->
They are entirely different things; int is a type, typedef is a way to define types.