One by one:
char x;
char y;
&
both together
char x,y;
yes
It is not necessary to to declare variables inside the function in C. If you declare a variable inside a function, the variable becomes local for the function and another variable of same name can be declared in any other function, but you can not use the variable declared in other function. When you declare any variable outside the function body then the variable becomes global and can be used in any function of the program. Note: errno is an example for a variable declared outside any function.
Yes.
When There is No Need to Change the Values of the Variables In Entire lifetime of That variables then we must use that Variable as Final Variable.
You have to declare it. The simplest way to do so is by using the Dim keyword. For example if you want a string variable called someString you would declare it thus: Dim someString as string
Depends on the programming language you are using. I will give two simple examples. In Command Prompt and when creating a batch file, you declare a variable by entering the "set" command. You can use different switches to change the type of variable you are declaring. /p makes the variable able to accept user input. /a makes the variable a numerical expression. In Python, you declare a variable just by stating the name of the variable and its value. x = value.
Str is probably a String variable declared. Usually when we declare String objects we prefix it with the character str. example: String strName = "";
There are two ways to declare varibles. 1. Locally 2. Globally When you declare a variable locally in any function that means it is only accessible by that function. When you declare a variable globally so it is accessible by all the functions in the program. Declaring variables with static keyword means you are setting its value null.
no it is not possible
datatype variable name;
A variable declaration is a math or programming term. A variable is an unnamed component. In the problem the wording will declare what the value of the variable is.
you have to give a statement in the following syntax datatype variable;
To declare a double precision variable in Fortran, you can use the "real(kind8)" declaration. This specifies that the variable should be of double precision, which is typically 8 bytes in size.
Yes.
no
yes
You declare a variable when you create it by specifying its datatype and name in a programming language. This tells the compiler or interpreter to allocate memory for the variable. Variables must be declared before they can be used in most programming languages.