fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int arr[20], i, j, size;
  5.  
  6. printf("\nEnter array size : ");
  7. scanf("%d", &size);
  8. k=size;
  9.  
  10. printf("\nAccept Numbers : ");
  11. for (i = 0; i < size; i++)
  12. scanf("%d", &arr[i]);
  13.  
  14. for (i = 0; i < size; i++) {
  15. for (j=i+1; j< size; j++){
  16. if (arr[i] == arr[j]){
  17. printf("%d ",arr[i]);
  18. i++;
  19. continue;
  20. }
  21. else {
  22. printf("nothing");
  23. }
  24. }
  25. }
  26. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
8
1 55 55 32 32 15 15 55
compilation info
prog.c: In function ‘main’:
prog.c:8:4: error: ‘k’ undeclared (first use in this function)
    k=size;
    ^
prog.c:8:4: note: each undeclared identifier is reported only once for each function it appears in
stdout
Standard output is empty