### Find Absolute Distance between the two points in JAVA

```public class Point {

private int x;
private int y;

public int getX() {
return x;
}

public void setX(int x) {
this.x = x;
}

public int getY() {
return y;
}

public void setY(int y) {
this.y = y;
}

public Point() {
setX(0);
setY(0);
}

public Point(int axis){
setX(axis);
setY(axis);
}

public Point(int xaxis, int yaxis){
setX(xaxis);
setY(yaxis);
}

@Override
public String toString() {
return "Values : (" + x + ", " + y + ")";
}

public int absoluteDistance(int xaxis, int yaxis){
return ((int) Math.sqrt(Math.pow((this.getX() - xaxis), 2) + Math.pow((this.getY() - yaxis), 2)));
}

public int absoluteDistance(Point p){
return ((int) Math.sqrt(Math.pow((this.getX() - p.getX()), 2) + Math.pow((this.getY() - p.getY()), 2)));
}

public static void main(String[] args) {

Point point1 = new Point();
Point point2 = new Point(150);
Point point3 = new Point(100,200);

System.out.println("point1  "+point1);
System.out.println("point2  "+point2);
System.out.println("point3  "+point3);

System.out.println("Absolute Distance Between point1 and point2  : "+point1.absoluteDistance(point2));
System.out.println("Absolute Distance Between point1 and point2  : "+point1.absoluteDistance(236,256));

}

}```

### C Questions

C Questions
C Questions

Note : All the programs are tested under Turbo C/C++ compilers.
It is assumed that,
Programs run under DOS environment, The underlying machine is an x86 system, Program is compiled using Turbo C/C++ compiler.
The program output may depend on the information based on this assumptions (for example sizeof(int) == 2 may be assumed).
Predict the output or error(s) for the following:

void main()
{
int const * p=5; printf("%d",++(*p));
}
Compiler error: Cannot modify a constant value.
Explanation:
p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".
main()
{
char s[ ]="man"; int i;
for(i=0;s[ i ];i++)
printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}
aaaa nnnn
Explanation

### Zoho Interview | Set 1 (Advanced Programming Round)

Third Round: (Advanced Programming Round) Here they asked us to create a “Railway reservation system” and gave us 4 modules. The modules were:
1. Booking
2. Availability checking
3. Cancellation
4. Prepare chart
We were asked to create the modules for representing each data first and to continue with the implementation phase.

My Solution :