Top "Variable-declaration" questions

In computer programming, variable declaration specifies properties of a variable (such as its type).

In C#, is there way to define an enum and an instance of that enum at the same time?

Looking for a code optimization in c# that allows me to both define an enum and create a variable of …

c# syntax enums variable-declaration
Equivalent of public static final variables

I understand that placing the word extern before a variable declaration in a header file declares the existence of a …

objective-c syntax extern variable-declaration
C++11 auto declaration with and without pointer declarator

What's the difference between the types of bar1 and bar2? int foo = 10; auto bar1 = &foo; auto *bar2 = &foo; …

c++ c++11 auto variable-declaration
How can I tell Visual Studio/Microsoft's C compiler to allow variable declarations after the first statement?

I have code that compiles on the GNUARM compiler, but Visual Studio 2010 issues errors. The issue involves declaring variables after …

c visual-studio-2010 variable-declaration
declare extern variable within a C function?

I define a variable in a C file: int x, and I know I should use extern int x to …

c declaration extern variable-declaration
Using the letter L in long variable declaration

long l2 = 32; When I use the above statement, I don't get an error (I did not used l at the …

java long-integer variable-declaration
Java switch : variable declaration and scope

How does the Java compiler handle the following switch block ? What is the scope of the 'b' variable ? Note that …

java scope initialization switch-statement variable-declaration
Check if variable been initialized in PHP

I have been implementing wordpress plugin and I faced a problem with finding out was variable been declared or not. …

php variable-declaration