0% found this document useful (0 votes)
4 views

Variables

A variable in C is a name assigned to a value that is stored in a specific memory location, with types including global, local, static, external, and register variables. Operators in C perform operations on operands and are classified into unary, binary, and ternary operators, with various types such as arithmetic, relational, and logical. Heuristic evaluation is a usability engineering method for identifying user-interface design problems, based on principles developed by Jakob Nielsen to enhance user experience.

Uploaded by

ckriti0531
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Variables

A variable in C is a name assigned to a value that is stored in a specific memory location, with types including global, local, static, external, and register variables. Operators in C perform operations on operands and are classified into unary, binary, and ternary operators, with various types such as arithmetic, relational, and logical. Heuristic evaluation is a usability engineering method for identifying user-interface design problems, based on principles developed by Jakob Nielsen to enhance user experience.

Uploaded by

ckriti0531
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

Define the term Variable and its types?

Ans:
A Variable is defined as the name which is assigned to the value in a C PROGRAM.
Variable names are associated with some memory locations or (storage area) and the
data stored in different types and is declared at the beginning of the main
function.
Each variable in C has a specific type, which regulates the size and layout of the
variable's memory which is the range of values that can be stored inside that
memory and the set of operations that can be applied to the variable.
There are some rules that are followed while naming a variable:

There are some rules for naming the variables:


DO's:
A variable name's must begin with a character
A variable should be given a meaningful name when declared
DONT's:
A variable name cannot begin with a digit
A variable name cannot start with an underscore(_)
A variable name must not begin with a capital letter
The variable name should not possess spaces or blanks
The variable name should not be the name of the keyword as (int, float, char)
Syntax of the variable:

type var_name = initial value;


For example,
int a= 10;
where,
int= datatype,
a= name of the variable,
10= value

There are different types of variables:


Global Variable:
The "GLOBAL" Variable is defined as the variable which is declared outside the main
function.
A Global variable is used to declare rather in the top or beginning of the function
including main.
For e.g.,
int global= 50;
void function()
{
int local= 30;
}
Local Variable:
The LOCAL VARIABLE is totally opposite to that of a GLOBAL VARIABLE as,
The "LOCAL" Variable is defined as the variable which is declared inside the main
function.
A Local variable is initialized at the top or beginning of the function.
For e.g.,
void function()
{
int a= 50;
}
Static Variable:
The STATIC VARIABLE is defined as the variable that is declared by using the
keyword "static".
The static keyword is defined only once in a C program.
Although, the default value of the STATIC variable is zero.
For e.g.,
void function()
{
static int= 10;
}
External Variable:
The EXTERNAL VARIABLE is defined as the variable that is declared externally.
These kind of variables can be share between multiple C files.
It declares the variable using the keyword "extern".
If we see it at a broader concept, it's scope is global and can exist between more
than one file.
For e.g.,
extern data_type variable_name;

Register Variable:
These kind of variables are stored in the CPU register instead of a conventional
storage place like RAM(random access memory).
At a broad level, it's scope is local and exists till the end of a block or a
function.
For e.g.,
register data_type variable_name= initial_name;

QUES. Describe the types of OPERATORS IN C!

Ans:
The term "Operators" is defined as the operations which are used in performing some
specific type of operations that are used to assign the function between two
operands.
(simple definition)

An operator in C can be defined as the symbols that helps us to perform some


specific functions such as
mathematical operations,
logical operations,
arithmetic operations,
relational operations,
assignment operations,
bitwise operations,
conditional operations
So. the values and variables used to perform the operations are called as the
"OPERANDS".

The operators are mainly classified into three categories:


1. Unary Operators
2. Binary Operators
3. Ternary Operators
In Unary operators, the following operations are performed:
1. Pre-increment Operator:
This operator is used before the value assigned. Also, known as prefix operator
for e.g.,

int a= 10, b= 40;


int p= "++a"+"++b";
void main()
{
}
Post-increment Operator:
This operator is used after the value assign. Also, known as post-fix operator
for e.g.,

int a= 10, y= 40;


int x= "a++"+"y++";
void main()
{
}

2. Pre-decrement Operator:
This operator comes before the variable, the value stored in the variable is first
decremented and then, assigned.
for e.g., int main()
{
int x= 10, y= 20;
int p= --x, --y;
printf("%d\n", x);
printf("%d\n", y);
return 0;
Post-decrement Operator:
This operator comes after the variable, the value stored in the variable is first
assigned, and then decremented.
for e.g., int main()
{
int x= x--, y--;
printf("%d\n", x);
printf("%d\n", y);
return 0;
}

In "BINARY" operators, the following operations are performed:


ARITHMETIC OPERATORS: The "arithmetic" operators includes the following:
NAME DESCRIPTION
OPERATOR
Addition This operation perform addition between two operands "+"
For e.g.,
int a= 10;
int b= 20;
int "a+b";
Subtraction This operation performs subtraction between two operands "-"
(subtracts two numbers)
For e.g.,
int a= 10;

int b= 30;
int "b-a";
Multiplication This operation performs the operation to multiply two operands "*"
For e.g.,
int a= 10;
int b= 20;
int "a*b";
Division This operation performs to divide two operands "/"
For e.g.,
int a= 10;
int b= 20;
int "b/a";
Modulus This operation performs the modulus function between two operands "%"
For e.g.,
int a= 10;
int b= 20;
int "a%b";
RELATIONAL OPERATORS: The "relational operators" checks operand is not equal to the
right operand.
satisfied when one of the two operands becomes true then,

the condition becomes true!


for e.g., int a 10;
int b= 40;
int "a!=b";
"!="

GREATER THAN This operation is performed between the two operands


when the left operand is greater than the right operand!
for e.g., int a= 10;
int b= 40;
int "a>b";
">"

LESS THAN This operation is performed when the left operand is less than the
right operand!
for e.g., int a= 10;
int b 40;
int "a<b"
"<"

GREATER THAN OR EQUAL TO This operation is performed


when the left operand is greater than or equal to the
right operand!
for e.g., int "a>=b"
">="

Ques. Explain the term "Heuristic Evaluation".


Ans.

The term "Heuristic Evaluation" is defined as the usability engineering method for
finding the problems in a user-interface design.
This technique enables the user to access the decisions that has already been made
by himself only. It also provides the ease of finding the errors which is done by a
small set of evaluators independently examine the interface which in turn, saves
time for the user.
Heuristic evaluation, developed by Jakob Nielsen, is a method for structuring the
critique of the system for continuing the designing process. This technique
encourages the user to make himself the owner of the assisted work,
which comes out to be true as everything about the design is in the hands of the
user.
Thus, heuristic evaluation is a set of general principles which are followed by the
evaluator.
Following are its features:
Expert-analysis: Heuristic evaluation comes under the category of expert analysis
as the principles are taken in control by the expert only which makes him able to
evaluate freely without any disturbance/error in the design process.
The evaluator decides the design earlier as to prevent the situation of regretting
later.
(as not choosing the right design in the beginning)
However, the founder of the method, "Nielsen's" ten heuristics helps the user to
perform the tasks more efficiently.
Iterative process:
Cost-effective:
Problem detective, not solution generation:

Although, Nielsen's 10 heuristics are widely used as a set of usability principles


that serve as a foundation for many heuristic evaluations. They provide a framework
for identifying common problems.
Following are the ten principles:
1. VISIBILITY OF SYSTEM STATUS:
In the first heuristic, the visibility of system's status is very crucial in order
to guide the user in context of some specific terms.
for e.g., what is going on the system as displaying the time and loading process
when updating a software.
2. MATCH BETWEEN REAL TIME AND SYSTEM:
In the second principle, the system's display language is same as the user's
native language which makes it easy for the user to understand clearly.
for e.g., some instructions given in the software.
3. AESTHETICS AND DESIGN:
In any system, aesthetics are the main component of designing the system is to
bring out the aesthetics and utility together in a form that makes the system looks
attractive and efficient.
4. HELP AND DOCUMENTATION:
Every system needs to have a special set of instructions to assist the user if he
is facing any problem in running the system. That set of instructions are called as
Help and documentations center which must be present in every system as when there
is no such menu in the system.
5. ERROR PREVENTION:
If a user is performing a task and an error comes while operating that task then,
the system must be able to help the user by identifying his mistake.
This principle consists of a very essential feature as helping the user by
providing correct assistance and let the user continue his task.
6. CONSISTENT:
Every system has the feature of providing the same and consistent system
applications, system's ability to provide the alternative for some task which is
not operating properly.
for e.g., If a user searches for something on Google, then the search engine only
provides the alternatives related to the search not the whole content on the search
engine.
7. HELP
8. USER CONTROL AND FREEDOM:
Earlier, when the size of the computer was as big as a room making the system
looks very bulky then, the system does not give the user that freedom and proper
control to use the system as operating a computer system was very difficult at that
times. But now, if we see the computers have changed completely as giving the user
an infinite no of options while using it, making its reach high and high at a
global level.
User satisfaction is very essential as at the end, the system is used by the user
only. So. it's the duty of the computer to provide the complete and efficient
information to the user.
for e.g., If use the system with full focus and accuracy, the user can build a
startup of himself by using the computers.

You might also like