answers correctly solved 2026/2027
What is a variable? - correct answer ✔o Also known as scalar
o Represents a value stored in the computer's memory
o A storage location paired w/ an associated symbolic name (an identifier), which contains some known
or unknown quantity of information referred to as a value
A variable is a name given to a storage area that our programs can manipulate. Each has a specific type,
which determines the size and layout of the variable's memory, the range of values that can be stored
within that memory, and the set of operations that can be applied to the variable. Basic value types: int,
char, float, double, decimal, Boolean, null
Substring - correct answer ✔A substring in C# string Class returns a new string that is a substring of
this string. The substring begins at the specified given index and extended up to the given length.
Substring(Int32) retrieves a substring from this instance; the substring starts at a specified character
position and continues to the end of the string. Substring(Int32, Int32) method to extract a substring
from a string that begins at a specified character position and ends before the end of the string.
What is a literal? - correct answer ✔A literal is any notation for representing a value within source
code; a value that is expressed as itself. A literal and a constant are essentially the same thing. The only
real difference is that a constant is defined once (much like a local variable) whereas a literal is defined
every time it is used.
What is a constant? - correct answer ✔A constant is a fixed value that the program may not alter
during its execution. These fixed values are also called literals. Constants are treated just like regular
variables except that their values cannot be modified after their definition.
, How do you know how many methods are on a stack at one time? - correct answer ✔each stack
represents a method
How do you verify if a textbox is numeric? - correct answer ✔Compare Validator: can be used to
perform various comparison operations—example: comparing data entered to a desired data type
<asp: CompareValidator
id="CheckForIntegerValue"
ControlToValidate="txtProductQuantity"
Text="Invalid Quantity"
Operator="DateTypeCheck"
Type="Integer"
Runat="server" />
OR:
Example: int parsedValue;
if (!int.TryParse(textBox.Text, out parsedValue))
{