answersLogoWhite

0


Best Answer

Yes.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you declare any variable above preprocessor directive?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Size of a variable without using sizeof operator?

Declare 2 pointer variable of the same type and assign the address of the variable to them and then increment one of them. Find the difference between the above 2 pointers using a type cast. This will be the size of the variable. Eg: double i; double * p = &i; double * q= p; p++; cout<<(int)p-(int)q<<endl;


Declare and initialize 2D array in java using two statements- one to declare variable the other to initialize elements?

I'm not sure what you're asking. Do you mean when you declare/instantiate an array like this? int[][] arr; arr = {{1, 2, 3},{4, 5, 6}}; I think that's right. *********************************** THIS IS INCORRECT because you can assign constant values to array only at time of initialization. Therefore above code will throw an error. Correct way is: int[][] arr = {{1, 2, 3},{4, 5, 6}}; thanx .. itsabhinav123@gmail.com


What is atmospheric distortion?

Moving or variable-temperature air above or inside the telescope which distorts the image.


What is variable in c plus plus programming?

You declare a variable by first defining its data type and then its name followed by a semi-colon. Here is an example: int variable; The example above declares an uninitialized integer variable. You can initialize the variable by giving it a value such as "int variable = 1;". It is important to initialize your variables, because you can get errors when executing your program that the variable does not have a value or is uninitialized. Variables that are uninitialized have whatever garbage value happens to be when the program is executed. Here are all of the data types that a variable can be: *int - integer value *char - character value *bool - boolean value


What is global variable in C programming?

A global variable is a variable that is declared at global scope, rather than file, namespace, function, class or nested scope. Global variables are usually declared with external linkage within a header and initialised in one (and only one) source file. Any file that includes the header (which includes the source file that initialised the global variable) then has unrestricted access to the variable. It is globally visible and any code can alter it. Global variables should be used sparingly and only when absolutely necessary. If the vast majority of the functions in your program require access to a particular variable, then a global variable makes perfect sense and is by far the simplest solution. However, a variable that is only used by a handful of functions can hardly be described as a global entity, thus it has no place within the global namespace and should be scoped to those functions that actually require it instead.

Related questions

What is a number or variable placed to the right of and above another number variable or expression?

XnThat is an exponent.


What does directive force magnets in a compass mean mesn?

It is the component of the earths magnet field which aligns the compass needle to the Magnetic North Pole. The Horizontal Component (directive force) is the greatest at the magnetic Equator (Aclinic Line), where the vertical component is the weakest. Above the magnetic north pole, it is the opposite. The Horizontal, or directive force is weakest and the vertical component is the strongest.


Size of a variable without using sizeof operator?

Declare 2 pointer variable of the same type and assign the address of the variable to them and then increment one of them. Find the difference between the above 2 pointers using a type cast. This will be the size of the variable. Eg: double i; double * p = &i; double * q= p; p++; cout<<(int)p-(int)q<<endl;


What does z equal in -29z-13?

In the algebraic expression above z is an unknown variable.


What graph axis does each variable from above go on?

X is horisontal Y is vertical


What are the regions above or below the optimal range of an environment variable called?

Zones of stress


Declare and initialize 2D array in java using two statements- one to declare variable the other to initialize elements?

I'm not sure what you're asking. Do you mean when you declare/instantiate an array like this? int[][] arr; arr = {{1, 2, 3},{4, 5, 6}}; I think that's right. *********************************** THIS IS INCORRECT because you can assign constant values to array only at time of initialization. Therefore above code will throw an error. Correct way is: int[][] arr = {{1, 2, 3},{4, 5, 6}}; thanx .. itsabhinav123@gmail.com


What is Total variable costs?

Total variable costs are the sum of expenses which change proportionally as the price of services and goods fluctuate. The total marginal costs above produced units is also referred to as total variable costs.


Description of preprocessing and its connection with symbol table manager?

Preprocessing is processing before the main processing. In php (php: hypertext preprocessor) the web server goes through the page and executes the php to generate the HTML page you're about to see. When your web browser processes the web page with it's layout engine, to give you what you see from all that confusing HTML, that's the main processing. e.g. <?php echo "Hello World!"?> outputs 'Hello World!' into the HTML document before it's sent. In programming on source code the preprocessor does about the same thing. It goes through and look for all the preprocessor instructions and executes them on the file. The main processing would be actually compiling the source code. e.g. #define ADOLLAR "$1.00" causes the preprocessor to go through the document and replace all occurrences of ADOLLAR with "$1.00". A table manager is basically a dictionary for the compiler/preprocessor, it holds the symbols and their associated definitions. The preprocessor would go through the document and add the "#DEFINE"s and their values to the symbol table. So after the example above it would look like: ADOLLAR | "$1.00" and the preprocessor would look through the rest of the document looking up all the symbols in the table until it found 'ADOLLAR' then replace it with "$1.00".


What is a variable cost A. office adminidtration B. rent C. building maintenance or D. raw materials?

Raw materials is the only variable cost in the above options.


What is the difference between uniform and variable velocity?

Uniform velocity is velocity unaffected by acceleration. Variable velocity is velocity affected by acceleration. Lauren "Physics above all!"


Why did Roosevelt most likely include biased language in the speech above?

to convince Congress to declare war on Japan