Hey guys, can you help me and tell me how am i using wrongly the void expression? : I'm newbie in C and wanted to create a function that receives one integer n and one array V, and check if my array contains the values of 1 to n.

This is my actual code:

#include <stdio.h>

void checkArray(int n, int* V);

void checkArray(int n, int* V){

	int remain = n;
	size_t length = sizeof V / sizeof V[0];
	for(int i = 0; i<length;i++){
		for(int j = 0; j<length;j++){
			if(V[j] == remain){
				remain--;
			}
		}
	}
	if(remain == 0)
		printf("It's Latin");
		printf("Not Latin");
}

int main(){

	int n;
	scanf("%d", &n);
	int V[] = {1,2,3,4,5,6,7,8};
	printf(checkArray(n, V));

}

I'm getting the error at my printf, where it says invalid use of void expression.




