answersLogoWhite

0

What is variable in c plus plus programming?

Updated: 8/11/2023
User Avatar

Saisrimallika

Lvl 1
14y ago

Best Answer

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

User Avatar

Wiki User

10y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

10y ago

A variable is simply a named object whose member value(s) can be changed or mutated. Its type may be primitive such as int, char, float or double, or it may be a user-defined type such as a class, struct, union or enum. Constants are the same as variables except that their immutable member value(s) cannot be changed.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

A variable is a named memory location for which the contents are volatile. The antonym of variable is constant.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

A variable is a place to store a value that may change while the a program runs.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Variables are volatile data types, as opposed to constants which are non-volatile data types.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Its type, its value and its memory address.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

There are 5 type of variables in C++....

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is variable in c plus plus programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is swap in c plus plus programming language?

It is not a reserved word, so can be an identifier (name of a type/variable/function).


What is the meaning of star d in c plus plus programming?

If d is a pointer variable, then *d is the value stored in the memory address pointed to by d.


Why study c plus plus programming?

we are using c plus plus programming for developing object oriented programing software.


What makes for a good or bad variable name in C plus plus programming languages?

A good variable name is one that is clear, related to the data it stores. Also, you should try to avoid confusions with other variables.


Differentiate C plus plus and Turbo C?

Turbo C is a software where C or C++ programming environment resides in.But C++ is itself a programming language.


What is printing out and inputting variable in C programming?

input and output


Is c plus plus a modular programming?

No, but it does support modular programming through namespaces.


What are the two major types of programming languages in c plus plus?

Object oriented programming and structured programming.


What is the purpose of C plus plus?

Computer programming.


What is c plus plus primarily used for?

Programming.


What is the significance of c plus plus?

C++ is an object oriented programming language


What does increments mean in C programming?

It has nothing to do with C, it simply means: add 1 to a variable.