1.5k views

Aliasing in the context of programming languages refers to

1. multiple variables having the same memory location
2. multiple variables having the same value
3. multiple variables having the same identifier
4. multiple uses of the same variable
edited | 1.5k views
0

OPTION A

In computer programmingaliasing refers to the situation where the same memory location can be accessed using different names. For instance, if a function takes two pointers A and B which have the same value, then the name A aliases the name B .

edited
A OPTION
+1

Call by reference is the best example for that.

+1
we can relate to SQL query also...

SQL aliases are used to give a table, or a column in a table, a temporary name.

B)multiple variables having the same value

int a=24;
int b=24;
int c=24;

C)multiple variables having the same identifier

int a=23;
char a='A';

D)multiple uses of the same variable

int a=23;
a=a*a;

A)multiple variables having the same memory location

int a=20;
int *p=&a;

0
@srestha Is your example for option (C) allowed in code?
0
why will it not allow?
+1

Try running this code- http://ide.geeksforgeeks.org/ccAyN2

0
yes, it is giving error because C doesnot allow multiple variable with same name

it is the example, what option C) is telling
0
As far as I know option (C) can't be implemented in real. Correct me if I am wrong.
ans c)
+1
Option a is more appropriate.