answersLogoWhite

0

How do you assign a variable in C?

User Avatar

Anonymous

12y ago
Updated: 8/20/2019

name = value

example: x=1

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How do you assign the product of variables b and c to variable a?

To assign the product of variables b and c to variable a in most programming languages, you would use the assignment operator. For example, you would write a = b * c;. This statement multiplies the values of b and c, and then assigns the result to the variable a.


What if -1 is assigned to a unsigned variable in C plus plus?

If you assign -1 to a unsigned variable it will contain the biggest number its able to hold. For example if you assign -1 to a unsigned int it will be 4294967295 as its the biggest number a unsigned int can hold.


How do you swap two variables using third variable in flow chart?

To swap two variables using a third variable in a flowchart, start with the initial values of the two variables, say A and B. Use a third variable, C, to temporarily hold the value of A (C = A). Next, assign the value of B to A (A = B), and finally, assign the value of C back to B (B = C). This sequence effectively swaps the values of A and B.


How do you assign the value 45 to the variable PassMark using High-level programming language?

In C: int pass_mark; pass_mark = 45; In C++: int pass_mark {45};


What is variable definition in c language?

variable definition means to declare the variable with its value. for example:- int i=10; this statement is a combination of declaration of integer i and assign its value to it,so it is a definition statement Note: assigning a value is not essential.


What machine instruction is used to assign a value to a variable in c plus plus?

MOVE, STORE, LOAD, or something similar, CPU-dependent.


What happens if you assign a negative number to an unsigned variable?

You will get something like MAX_INT - number you are trying to assign.


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.


How do you assign value of one variable to another variable in unix?

If you are asking about shell usage, just assign the value as follows: first=5 second=2 first=$second


What statement is used to assign a value to a variable?

In programming, the statement used to assign a value to a variable is typically the assignment statement, which often uses the equals sign (=). For example, in Python, you would write x = 5 to assign the value 5 to the variable x. This statement sets the variable to hold the specified value, allowing it to be used later in the program.


Which axis of a graph would you assign the independent variable?

The horizontal axis.


How can a variable be used in JAVA?

A variable is just a memory location of a valuea variable is accessed by a namesuppose of the integer type u got a variable aSoDECLARATION-int a;and then store any integer value to a.a=4;or take input from user.then perform any arithmetic function on a.a+5;returns 9;there are different variables but the essential concept behind variables is the same!