answersLogoWhite

0

A C variable cannot start with?

Updated: 12/16/2022
User Avatar

Wiki User

13y ago

Best Answer

it should not start with _ or digit.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: A C variable cannot start with?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is it necessary to initialize the const variable in c?

A constant variable cannot have its value changed at program run time.


What is a constant as used in C programming?

A variable of which the value cannot change. Example of its usage: const int foo = 5;


How can you change the value of a constant variable in C?

You can change a static variable by putting the static variable into a function that has operations that you intend to execute upon the variable. Example, you want to change the static variable to another value or make an addition of 2. Put the source code inside a function with the static variable declared locally within the function.Every time you call the function, the static variable value will change. Take note that the static variable retains the last value you declared it in your function call.A more terse answerLocal variables declared as static are changed as normal; they are special in that their values persist across function calls.


Difference between array and pointers in c plus plus?

A pointer is simply a variable that can store a memory address and has the same purpose in both languages. The only real difference is that C++ pointers can point at objects (instances of a class) and indirectly invoke their methods, whereas pointers in C (which is not object oriented) cannot.


What is an alias name given to a variable in opp with c plus plus?

An alias is a reference, an alternate name for a variable or constant. You can assign the address of any variable or constant to a reference of the same type. A reference is a bit like a constant pointer to the type but, unlike a pointer, a reference has no address of its own thus you cannot store references. More importantly, references can never be NULL. They are simply an alternative name by which you can refer to an existing variable or constant. When you assign a value to an existing reference to a variable, you are assigning the value to the variable itself. When you pass a reference to a function, you are passing the address of the value being referred to, and that address is assigned to the function's reference argument and is local to the function. This is not unlike passing a pointer, but pointers may be NULL, references are guaranteed to be non-NULL (a NULL reference invalidates your program). Note that C++ references are not the same as C reference variables or constants. In C, a reference variable is simply a non-const pointer, while a reference constant is a constant pointer. Hence pointers can be dereferenced (both in C and C++). But in C++, a reference is neither a variable nor a pointer, but is constant (it always refers to the same object and cannot be reassigned once assigned).

Related questions

Is it necessary to initialize the const variable in c?

A constant variable cannot have its value changed at program run time.


What are variables in C?

variable is must start with letter or ( _ ) under score ex : int a; means a is a variable we can store value on it


20 c4 3c3 5c2 is this a monomial?

No. A monomial cannot have the variable c to different powers.


Differentiate between C Constants and C variables?

A constant value cannot be changed once set. A variable can be changed whenever you want.


What is the constant variable in Avogadro's law?

The question is about an oxymoronic expression. A constant cannot be a variable and a variable cannot be a constant!


C plus plus program to add a letter in a permanent letters alphabetically?

If by permanent you mean constant, you cannot change something that is constant, therefore you cannot add to it (letters or otherwise). It has to be variable. Constant and variable are mutually exclusive terms.


What is a constant as used in C programming?

A variable of which the value cannot change. Example of its usage: const int foo = 5;


When an experiment showes that one variable makes another variable change and no other variable has any effect what is the experiment showing?

causation


What is the variable that cannot be controlled in an experiment?

The dependent variable.


What is the difference between a do while loop and a for loop in c?

the counter variable cannot be initialized in while loop before entering into the block.


How can you change the value of a constant variable in C?

You can change a static variable by putting the static variable into a function that has operations that you intend to execute upon the variable. Example, you want to change the static variable to another value or make an addition of 2. Put the source code inside a function with the static variable declared locally within the function.Every time you call the function, the static variable value will change. Take note that the static variable retains the last value you declared it in your function call.A more terse answerLocal variables declared as static are changed as normal; they are special in that their values persist across function calls.


What is variabale?

It is spelled variable, and is simply a placeholder. You can assign a value to a variable, which points at the memory base of the value. A variable can be called almost anything, however there are certain things they cannot be named. Read some C programming tutorials for a complete explanation of variables.