Try this (changes to the original have been commented).
Code:
#include<stdio.h>
#include<conio.h>
#define STUDENTS 3
#define ITEMS 8
//void main()
int main(void)
{
char key[ITEMS+1],response[ITEMS+1];
int i,student,count,n,correct[ITEMS+1];
/* reading of correct answers into an array*/
printf("input key to the items");
for(i=0;i<ITEMS;i++)
scanf("%c",&key[i]);
for(i=0;i<ITEMS;i++)
printf("key[%d]=%c\n",i,key[i]);
while (getchar() != '\n');
/*evaluation begins*/
for(student=1;student<=STUDENTS;student++)
{
/*reading student responses and counting correct ones*/
count=0;
printf("input response of student:%d",student);
for(i=0;i<ITEMS;i++)
scanf("%c",&response[i]);
for(i=0;i<ITEMS;i++)
correct[i]=0;
for(i=0;i<ITEMS;i++)
if(response[i]==key[i])
{
count=count+1;
correct[i]=1;
}
/*printing of results*/
printf("student:%d",student);
printf("score is %d out of %d\n",count,ITEMS);
printf("response to the following items are wrong\n");
n=0;
for(i=0;i<ITEMS;i++)
if(correct[i]==0)
{
printf("%d",i+1);
n=n+1;
}
if(n==0)
{
printf("nil\n");
}
//getch();
getchar();
}
getchar();
return 0;
}