answersLogoWhite

0

In C, try this line:

int intNumSold;

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is the main variable?

Variables are names for which the value may be altered. That is, the value of a name is variable. For example: int x; // Declares a variable named x. int y = 0; // Declares and initialises a variable named y. x = 5; // Changes the value of the variable named x. y = x; // Changes the value of the variable named y. By contrast, constants are names for which the value does not change: const int z = 10; // Declares a constant named z, which will always have the value 10.


Write a pseudocode statement that declares the variable cost so it can hold real numbers?

floating-point variable cost


What is a variable plus a variable?

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


What is a valid variable declaration in PHP?

In PHP, you can declare a variable in several ways.In the global scope, or within a function, you can use:var $variable; // Creates an empty variable$variable = {something}; // declares, then assigns, the variableIn the object scope, a property operates like a variable:public $variable; // Creates an empty propertyprivate $variable; // Same thing, but can't be referenced outside the objectprotected $variable; // Similar, but can only be referenced in the object or any object extended by itpublic/private/protected $variable = {something}; // declares, then assigns a default value to, the property$this->variable = {something}; // if not declared, this will declare the property and assign the value to itYou can also create object properties from outside the object:$object->variable = {something}; // works just like $this->variableFinally, the arguments to a function are implicitly declared:function DoSomething ($variable) { ... } // declares and assigns $variableVariables in PHP are very flexible, mutable things. This is unlike some other languages that rely on strict type declarations for variables and other code constructs.


What is difference between String str and String s equals new String?

Btw, this is a C++ question. in 'String str', str is an object and most probabily (based on most String implementations) we can use str = "my name"; int len = str.length(); String s = new String; <== this is something wrong. it should be String *s = new String; here 's' is a pointer and the object is allocated/instanciated by 'new' operator you can use it *s = "my name" int len = s->length()


What is a function of a variable?

A variable is a named memory address in which a value may be stored and mutated.


What statement declares a four element array named square?

Cannot be answered without "the following statments" :(


How can you create your own variable named while and make it hold a function value?

You cannot create a variable named "while", since that is a reserved word.


Deifference between declaration and definition?

Declaring a variable or function reserves an entry in a symbol table for that function or variable (entries in a symbol table eventually become memory addresses during linkage). Defining a variable or function actually specifies the value to be stored in the memory location specified and/or the code that should be compiled. Examples: Declaration: int foo(); // Declares a function. int bar; // Declares a variable. Definition: int foo() { printf("Hello World"); } bar = 5; Declaration and definition: int bar = 5;


Write a pseudocode statement that declares the variable total so it can hold integers Initialize the variable with the value 0?

Declare Real price=49.95 Display "the original price." Input item original price Display "price"


What defines a variable?

A variable is a named storage location that can hold any data value. A variable has two associated values ; r value and l value.


What is constant and variable?

A variable is a named object that is mutable. A constant is a named object that is immutable.