Mandatory, before the first usage.
This was simply the choice of the language designers, who probably decided to carry over that convention from the C/C++ languages.
Dynamic Binding means declaring variables at run time only rather than declaring it at compile time.
Constant variables refers to those variables whose values cannot be changed. These variables should be initialized along with their declaration. Attempt to change the value of a constant variable will generate compile error. The syntax for declaring a constant variable is:const data-type variableName = value;
I'm not sure. I have written C programs in which the default value was what ever happened to be in the variable's memory location when the space was allocated. So it could be 0. Or it could be anything. That is why it is always important to initialize variables when using C. I don't know if this is true with modern C compilers. No default value for automatic variables, 0 for others.
There are mainly 3 types of variables in c. Integer, Float and character :)
A and C are both variables.
Turbo C variables are memory place holders for storage of data during the execution of a Turbo C program. Types of variables include integer, real and char.
to store values
Only global/static variables are, local variables aren't.
Pointer variables point to data variables. They are mostly used to point to dynamically allocated data variables, but can actually point to anything (e.g. statically allocated variables, array elements, anywhere inside a variable, program machine code, I/O device descriptors, nonexistent memory). Misuse of pointer variables, either unintentionally or intentionally, is a major cause of nearly impossible to debug software problems in programs written in C (and C++).
If you do not know then you cannot write a program. The compiler is not clairvoyant so it cannot do it for you.
In C, C++ and Java, all variables must be declared before they can be used. A declaration determine's the variable's type and name, nothing more. The type must be visible to the compiler at the point of declaration in order to determine the amount of memory require by that type. The type naturally determines what type of data may be stored in the variable. The name is user-defined and must be unique to the scope in which the variable is declared. The name provides a reference to the memory address allocated to the variable at runtime. In C, variables are always uninitialised (they have no value). As such, C programmers typically declare all variables used by a function at the top of the function, initialising them as and when required. This can lead to problems if the programmer forgets to initialise the variable before using it, however the compiler should emit a warning to guard against this. If the programmer ignores the warning, the program will have undefined behaviour. C++ and Java are similar to C in that respect but, unlike C, variables may be initialised at the point of declaration (assigned a value of the type). This encourages programmers to declare variables at the point they are actually required rather than up front. Constants are similar to variables except they do not change value once initialised. Constants must always be initialised at the point of declaration except in C++ when declaring a constant at class scope; it must be initialised at global scope (outside the class). In Java, constants are declared with the 'final' keyword before the variable's type. Both C and C++ use the 'const' keyword. Variables may also be declared volatile which means the variable's value is outwith the control of the process or thread in which it is declared and could change at any time. Declaring a volatile simply ensures that the variable cannot be read during a write (creating a race condition) and that all access must occur in main memory; the variable cannot be cached.