int. varible or input?

When defining varibles, you type int variable = 0; right? so its defined now and by default its 0.

What about when defining digital inputs? int inputpin = 0; right?

Analog pins have the letter A but what about digital? How does arduino know is it variable or input?

edit: nicely typoed subject.

What about when defining digital inputs? int inputpin = 0; right?

Wrong. All you have done there is defined an "int" variable called "inputpin".

If you were to use "inputpin" as an argument to a call to "digitalRead" (e.g. "val = digitalRead (inputpin) ;" ), then you might be said to be defining it as an input, but only if you had made sure with a call to pinMode that "inputpin" was an input.

When are creating named constants to pass to pinMode() and digitalRead() you should probably use 'const int':

const int inputpin = 3;  //  Input from our sensor

The 'const' keyword tells the compiler that the value of that variable will not be changed. It allows the compiler to optimize the code better AND it allows the compiler to let you know if you do something stupid like "inputpin = HIGH;".

Analog pins have the letter A but what about digital?

Wrong. Analog pins being used as digital pins have an alias defined, where the alias starts with the letter A. Analog pins as analog pins do not have the letter A; they are just numbers, like the digital pins.

(But you can still use the A prefix if you want to use it as an analogue pin)

Umm..

Analog pins being used as digital pins have an alias defined

What do you mean by using as digital pins? Digital and analog pins are physically different pins(?)

Yes, they are physically different pins, but analogue pins can be used as digital I/O pins.
Analogue pin 0 is digital pin 14.

AWOL:
Yes, they are physically different pins, but analogue pins can be used as digital I/O pins.
Analogue pin 0 is digital pin 14.

Which is why "A0" is defined as "14" and why analogRead() will subtract 14 from the pin number if you give it a number >=14.

(For Arduino Mega the 'analog input' pins start at 54 instead of 14.)