edited by
22,597 views
42 votes
42 votes

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 by

9 Answers

Best answer
48 votes
48 votes

Option is 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 by
41 votes
41 votes

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;

This example also good http://www.cs.uregina.ca/Links/class-info/cplusplus/Standards/Disk10/aliasing_c.html

16 votes
16 votes
A OPTION
3 votes
3 votes
int i=10;
int *p=&i;
As long as p points to i,  we say that *p is an alias for i.
Answer:

Related questions

52 votes
52 votes
3 answers
2
Kathleen asked Sep 14, 2014
11,745 views
The most appropriate matching for the following pairs$$\begin{array}{|ll|ll|}\hline X: & \text{m = malloc(5); m = NULL;} & 1: & \text{using dangling pointers} \\\hline Y...
29 votes
29 votes
2 answers
4
Kathleen asked Sep 14, 2014
14,919 views
The value of $j$ at the end of the execution of the following C program:int incr (int i) { static int count = 0; count = count + i; return (count); } main () { int i, j; ...