I'm trying to make a program to compare array elements using pointers and to give me some result; I make this simple program just to test if it works but I don't know why.. if i enter equals numbers nothing happes. So the first variable of the array is ptr so ptr + 1 means the next element, if i enter directly ch[0] == ch[1] it works. After that I want to make the program to compare characters if are the same.
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
int ch[2];
int *ptr = &ch;
scanf("%d%d", &ch[0], &ch[1]);
printf("Numbers to compare %d and %d", *ptr, *ptr + 1);
if (*ptr == *ptr + 1){
printf("Equals numbers\n");
}
return 0;
}

*ptr + 1should be*(ptr + 1)andptr=&ch;should beptr=ch;