Help me in solving MISSP problem

My issue

what is a Runtime error

My code

#include <stdio.h>

int main(void) {
	
	int i,j,a[100],t,n,temp;
	
	scanf("%d\n",&t);
	
	scanf("%d\n",&n);
	
	 for(i=0;i<n;i++)
	    {
	        scanf("%d\n",&a[i]);
	    }
	    
	while(t>0)
	{
	    for(i=n;i>0;i--)  //3
	    {
	        for(j=0;j<i-1;j++) //1
	        {
	            if(a[j]>a[j+1])  //2>1
	            {
	                temp=a[j];
	                a[j]=a[j+1];
	                a[j+1]=temp;
	            }
	            else
	            {
	                continue;
	            }
	        }
	        
	      
	    }           //n=3
	      for(i=0;i<n-1;i++) //1
	        {
	            if(a[i]==a[i+1])  //1==1
	            {
	                continue;
	            }
	            else
	            {
	                printf("%d\n",a[i+1]);
	            }
	            
	        }
	        t--;
	    
	}

}


Learning course: Arrays, Strings & Sorting
Problem Link: Chef and Dolls Practice Problem in Arrays, Strings & Sorting - CodeChef

@mtvcods

A runtime error is an error that occurs while a program is running, as opposed to a compile-time error, which occurs during the compilation of the program code. Runtime errors typically happen when a program encounters unexpected conditions or inputs that it cannot handle properly. These errors can lead to the termination of the program or unexpected behavior.

Some common causes of runtime errors include:

1. Division by zero: Attempting to divide a number by zero.
2. Accessing invalid memory addresses: Trying to access memory that has not been allocated or has been deallocated.
3. Overflow or underflow: When a calculation results in a number that is too large or too small to be represented by the data type used.
4. Invalid input: When the user provides input that the program does not expect or cannot handle.
5. Null pointer dereference: Attempting to access or manipulate a memory address that points to nothing (null).
6. Stack overflow: When a program exhausts the available stack space, often due to excessive recursion or allocating large amounts of memory on the stack.

Runtime errors can be challenging to debug because they occur while the program is running and may not always be reproducible. However, various debugging techniques, such as using debugging tools, logging, and code inspection, can help identify and fix runtime errors.

The easier logic would be just calculate the xor of the whole array.