criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
   int main()
       {
           int H, W;
           while (true) {
               std::cin >> H >> W;
 ???             if (H == 0 && W == 0) {
                   break;
               } else {
                  for (int w = 1; w <= W; ++w) {
                      std::cout << "#";
                  }
                  std::cout << std::endl;
                  for (int h = 2; h <= H - 1; ++h) {
                      std::cout << "#";
                      for (int c = 2; c <= W-1; ++c) {
                          std::cout << ".";
                      }
                      std::cout << "#" << std::endl;
                  }
                  for (int w = 1; w <= W; ++w) {
                      std::cout << "#";
                  }
                  std::cout << std::endl;
              }
          }
      return 0;
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:2: error: expected primary-expression before '?' token
    7 |  ???             if (H == 0 && W == 0) {
      |  ^
a.cc:7:3: error: expected primary-expression before '?' token
    7 |  ???             if (H == 0 && W == 0) {
      |   ^
a.cc:7:4: error: expected primary-expression before '?' token
    7 |  ???             if (H == 0 && W == 0) {
      |    ^
a.cc:7:18: error: expected primary-expression before 'if'
    7 |  ???             if (H == 0 && W == 0) {
      |                  ^~
a.cc:7:5: error: expected ':' before 'if'
    7 |  ???             if (H == 0 && W == 0) {
      |     ^            ~~
      |     :
a.cc:7:18: error: expected primary-expression before 'if'
    7 |  ???             if (H == 0 && W == 0) {
      |                  ^~
a.cc:7:5: error: expected ':' before 'if'
    7 |  ???             if (H == 0 && W == 0) {
      |     ^            ~~
      |     :
a.cc:7:18: error: expected primary-expression before 'if'
    7 |  ???             if (H == 0 && W == 0) {
      |                  ^~
a.cc:7:5: error: expected ':' before 'if'
    7 |  ???             if (H == 0 && W == 0) {
      |     ^            ~~
      |     :
a.cc:7:18: error: expected primary-expression before 'if'
    7 |  ???             if (H == 0 && W == 0) {
      |                  ^~
a.cc:9:18: error: 'else' without a previous 'if'
    9 |                } else {
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int x, y;

  while(true){
    cin >> y;
    cin >> x;
    if((x|y)==0) break;

    for(int i=0; i<y; i++){
      cout << "#";
      for(int j=1; j<x-1; j++){
	if(i==0 || i==y-1) cout << "#";
	else cout << ".";
      }
      cout << "#" << endl;
    }
&#160; &#160; cout << "" << endl;
  }

  return 0;
}

Compiler output:
a.cc:20:2: error: stray '#' in program
   20 | &#160; &#160; cout << "" << endl;
      |  ^
a.cc:20:9: error: stray '#' in program
   20 | &#160; &#160; cout << "" << endl;
      |         ^
a.cc: In function 'int main()':
a.cc:20:3: error: lvalue required as unary '&' operand
   20 | &#160; &#160; cout << "" << endl;
      |   ^~~
a.cc:20:10: error: lvalue required as unary '&' operand
   20 | &#160; &#160; cout << "" << endl;
      |          ^~~
Language: C++

//AOJ10013
//AOJ10012の改良版
//2012/09/14 15:54

#include <stdio.h>

int main ()
{

	int h,w;

	while(1)
	{
	
		scanf("%d %d\n",&h,&w);

		if(h === 0 && w == 0)break;

		int i,j;

		for(i=0 ; i<h ; i++ )
		{

			for (j==o;j<w;j++)
			{

				if(j>1&&j<w&&i>1&&<h)
				{
				printf(".");
				}
				else
				{
					printf("#");
				}
			}
			printf("\n");
		}

		printf("\n");
	}

	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: expected primary-expression before '=' token
   17 |                 if(h === 0 && w == 0)break;
      |                        ^
a.cc:24:33: error: 'o' was not declared in this scope
   24 |                         for (j==o;j<w;j++)
      |                                 ^
a.cc:27:51: error: expected primary-expression before '<' token
   27 |                                 if(j>1&&j<w&&i>1&&<h)
      |                                                   ^
Language: C++

//AOJ10013
//AOJ10012の改良版
//2012/09/14 15:54

#include <stdio.h>

int main ()
{

	int h,w;

	while(1)
	{
	
		scanf("%d %d\n",&h,&w);

		if(h == 0 && w == 0)break;

		int i,j;

		for(i=0 ; i<h ; i++ )
		{

			for (j==0;j<w;j++)
			{

				if(j>1&&j<w&&i>1&&<h)
				{
				printf(".");
				}
				else
				{
					printf("#");
				}
			}
			printf("\n");
		}

		printf("\n");
	}

	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:51: error: expected primary-expression before '<' token
   27 |                                 if(j>1&&j<w&&i>1&&<h)
      |                                                   ^
Language: C++

int main()
{
    int i,k,H,W;
    while(1){
        scanf("%d %d",&H,&W);
        if(H==0&&W==0)break;{
            for(i=0; i<H; i++){
            for(k=0; k<W; k++){
            if(i==0||i==H-1){
                printf("#");
            }
                else if(k==0||k==W-1){
                    printf("#");
                    }
                        else{
                            printf(".");
                            }
                    }
                puts("");
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
    5 |         scanf("%d %d",&H,&W);
      |         ^~~~~
a.cc:10:17: error: 'printf' was not declared in this scope
   10 |                 printf("#");
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:13:21: error: 'printf' was not declared in this scope
   13 |                     printf("#");
      |                     ^~~~~~
a.cc:13:21: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:16:29: error: 'printf' was not declared in this scope
   16 |                             printf(".");
      |                             ^~~~~~
a.cc:16:29: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:19:17: error: 'puts' was not declared in this scope
   19 |                 puts("");
      |                 ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int h, w;
  while(cin >> h >> w)
  {
    if(h == 0 && w == 0) break;
    for(int i=0; i<h; i++) 
    {
      for(int j=0; j<w; j++)
       {
        if(i==0 || i+1-h == 0)
       cout<<"#";
         else if(j==0; j+1-w==0)
         cout<<"#";
         else 
         cout<<".";
      }
      cout << endl;
    }
    cout << endl;
  }
 }
  return 0;
}

Compiler output:
a.cc:26:3: error: expected unqualified-id before 'return'
   26 |   return 0;
      |   ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int h, w;
	while(1) {
		cin >> h >> w;
		if ((h == 0) && (w == 0))
			cout << "\n";
			break;
		else if ((h >= 3) && (h <= 100) && (w >= 3) && (w <= 100)) {
			for (int i = 0; i < h; i++) {
				for(int j = 0; j < w; j++)
					if ((i == 0) || (i == h -1) || (j == 0) || (j == w - 1))
						cout << '#';
					else
						cout << '.';
				cout << "\n";
			}
			cout << "\n";
		}
	}
		
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'else' without a previous 'if'
   12 |                 else if ((h >= 3) && (h <= 100) && (w >= 3) && (w <= 100)) {
      |                 ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int h,w;
	cin >>h>>w;
	for(int i=0;i<h;i++){
		{
		
			if((h== 0 && w ==0))||h<3||w>300)
	{
		break;
	}
	for(int j=0;j<w;j++)
		if(i==0||i==h-1||j==0||j==w-1)
		{
			cout << "#";
		}
		else{
			cout << ".";
		}
	}
	cout << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:45: error: expected primary-expression before '||' token
    9 |                         if((h== 0 && w ==0))||h<3||w>300)
      |                                             ^~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <queue>
#include <numeric>
#include <ctime>
using namespace std;

int main(){
	int H,W,i,j;
	
	while(	cin >> H >> W, H,W){
		for(i=0; i<H; i++){
			for(j=0; j<W; j++){
				if(i==0 || i+1==H || j=0 || j+1==W)
						cout << "#";
				else	cout << ".";
			}
			cout << endl;
		}
		cout << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:51: error: lvalue required as left operand of assignment
   22 |                                 if(i==0 || i+1==H || j=0 || j+1==W)
      |                                    ~~~~~~~~~~~~~~~^~~~
Language: C++

##########
#........#
#........#
#........#
#........#
##########

#include <stdio.h>
int main(void)
{
int H ,W;
int i, j;
while(1){
scanf("%d %d" ,&H ,&W);
if(H == 0 && W == 0) break;
for ( i = 0; i < H; i++ ){
for ( j = 0; j < W; j++ ){
if(j==0||j==W-1||i==0||i==H-1){
printf("#");
}else{
printf(".");
}
}
printf("\n");
}
puts("");
}
return 0;
}

Compiler output:
a.cc:1:1: error: stray '##' in program
    1 | ##########
      | ^~
a.cc:1:3: error: stray '##' in program
    1 | ##########
      |   ^~
a.cc:1:5: error: stray '##' in program
    1 | ##########
      |     ^~
a.cc:1:7: error: stray '##' in program
    1 | ##########
      |       ^~
a.cc:1:9: error: stray '##' in program
    1 | ##########
      |         ^~
a.cc:2:2: error: invalid preprocessing directive #...
    2 | #........#
      |  ^~~
a.cc:3:2: error: invalid preprocessing directive #...
    3 | #........#
      |  ^~~
a.cc:4:2: error: invalid preprocessing directive #...
    4 | #........#
      |  ^~~
a.cc:5:2: error: invalid preprocessing directive #...
    5 | #........#
      |  ^~~
a.cc:6:1: error: stray '##' in program
    6 | ##########
      | ^~
a.cc:6:3: error: stray '##' in program
    6 | ##########
      |   ^~
a.cc:6:5: error: stray '##' in program
    6 | ##########
      |     ^~
a.cc:6:7: error: stray '##' in program
    6 | ##########
      |       ^~
a.cc:6:9: error: stray '##' in program
    6 | ##########
      |         ^~
Language: C++

#include<iostream>
using namespace std;

int main()
{
    int H,W;
    for(int p=1;p>0;p++){
        cin>>H>>W;
        if(H==0&&W==0){
	return 0;
        }
        else{
	for(int i=0;i<H;i++){
	     if(i==0||i==H-1){
	           for(int j=0;j<W;j++){
		    cout<<'#';
	           }
	           cout<<endl;
	     }
	     else{
	           for(int g=0;g<W;g++){
		    if(g==0||g==W-1){
		           cout<<'#';
		    }
	                 else{
		           cout<<'.';
		    }					           }
	           cout<<endl;
	     }
	}
	cout<<endl;
         }
    }	
}
}

Compiler output:
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cmath>
using namespace std;
#define MAX_N 100

int m, n, i, j;

int sort(const void *a, const void *b){
  return *(int*)a - *(int*)b;
}

int main(){
  while(1){
    scanf("%d %d", &n, &m);
    if(n == 0 && m == 0) break;
    for(i = 0; i < n; i++){
      for(j = 0; j < m; j++){
	if(i % n - 1 == 0 || j % m == 1)
	  printf("#");
	else printf(".");
      printf("\n");
    }
    printf("\n");
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:13:11: note: to match this '{'
   13 | int main(){
      |           ^
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cmath>
using namespace std;
#define MAX_N 100

int m, n, i, j;

int sort(const void *a, const void *b){
  return *(int*)a - *(int*)b;
}

int main(){
  while(1){
    scanf("%d %d", &n, &m);
    if(n == 0 && m == 0) break;
    for(i = 0; i < n; i++){
      for(j = 0; j < m; j++){
	if(i % (n - 1) == 0 || j % (m - 1) == 0)
	  printf("#");
	else printf(".");
      printf("\n");
    }
    printf("\n");
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:13:11: note: to match this '{'
   13 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;

int main(){
	int h, w, i, j;
	while(1){
		scanf("%d %d ", &h, &w);
		if(h == 0 && w == 0) break;
		for(i = 0; i < h; i++){
			for(j = 0; j < w; j++){
				if(j = 0; j < w; j++){
					printf("#");
				}else{
					printf(".");
				}
			}
			printf("\n");
		}
	printf("\n");
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:48: error: expected ')' before ';' token
   12 |                                 if(j = 0; j < w; j++){
      |                                   ~            ^
      |                                                )
a.cc:12:53: error: expected ';' before ')' token
   12 |                                 if(j = 0; j < w; j++){
      |                                                     ^
      |                                                     ;
a.cc:14:34: error: 'else' without a previous 'if'
   14 |                                 }else{
      |                                  ^~~~
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

int main(void)
{
    int h,w;
    int i,j;
    
    while (1) {
        scanf("%d %d",&h, &w);
        if (h==0 && w==0) {
            break;
        }else {
            for (i=0; i < h; i++) {
                for (j=0; j < w; j++) {
                    if (i==0 || i==h-1 || j==0 || j==w-1) {
                        printf("#");
                    }else{
                        printf(".");
                    }
                }
                printf("\n");
            }
            printf("\n");
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf' was not declared in this scope
    7 |         scanf("%d %d",&h, &w);
      |         ^~~~~
a.cc:14:25: error: 'printf' was not declared in this scope
   14 |                         printf("#");
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void)
a.cc:16:25: error: 'printf' was not declared in this scope
   16 |                         printf(".");
      |                         ^~~~~~
a.cc:16:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:19:17: error: 'printf' was not declared in this scope
   19 |                 printf("\n");
      |                 ^~~~~~
a.cc:19:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:21:13: error: 'printf' was not declared in this scope
   21 |             printf("\n");
      |             ^~~~~~
a.cc:21:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <stdio.h>

void drawRect(int H, int W) {
	for (int y = 0; y < H; y++) {
		for (int x = 0; x < W; x++) {
			if ((x == 0) || (x == (W - 1)) || (y == 0) || (y == (H - 1)) {
				printf("#");
			} else {
				printf(".");
			}
		}
		printf("\n");
	}
	printf("\n");
}

int main(void) {
	int H = 0, W = 0;
	for (;;) {
		scanf("%d %d", &H, &W);
		if ((H == 0) && (W == 0)) {
			break;
		}
		drawRect(H, W);
	}
	return 0;
}

Compiler output:
a.cc: In function 'void drawRect(int, int)':
a.cc:6:85: error: expected ')' before '{' token
    6 |                         if ((x == 0) || (x == (W - 1)) || (y == 0) || (y == (H - 1)) {
      |                            ~                                                        ^~
      |                                                                                     )
a.cc:11:17: error: expected primary-expression before '}' token
   11 |                 }
      |                 ^
Language: C++

#include <stdio.h>

int main(){
  int h;
  int w;
  int i;
  int j;
  int k;

  scanf("%d %d",&h  ,&w);

  for(i = 0; i < h; i++){
    for(j = 0; j < w; j++){
      if(   ){
	printf(".");
      }else{
	printf("#");
      }
    }
    printf("\n");
     
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: expected primary-expression before ')' token
   14 |       if(   ){
      |             ^
a.cc:22:4: error: expected '}' at end of input
   22 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  while(1) {
    cin >> H >> W; // 1データの入力
    if(H == 0 && W == 0) break; // 終了条件

    for(int y = 0; y < H; y++) { // 縦
      for(int x = 0; x < W; x++) { // 横
        if(x == 0 || x == W - 1 || y == 0 || y == H-1) {
          cout << "#";
        }else{
          cout << ".";
        } 
      }
      cout << endl; // 横が終わったら改行
    }
    cout << endl; // データーの最後に改行
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'H' was not declared in this scope
    6 |     cin >> H >> W; // 1データの入力
      |            ^
a.cc:6:17: error: 'W' was not declared in this scope
    6 |     cin >> H >> W; // 1データの入力
      |                 ^
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());	//????????°???
		String str;	//??\??????????????????
		String min;	//?????????????????????
		int r = 0;	//?????¨???????????????????????°???
		
		min = scan.next();
		for( int i = 1; i < n; i++ ){
			str = scan.next();
			Check();
		}
		
		return;
	}
	
	public static void Check(String s, String m){
		int i = 0;
		for( i = 0; i < s.length() && i < m.length(); i++ ){
			if( (int)s.charAt(i) < (int)m.charAt(i) ){
				return s;
			}else if( (int)s.charAt(i) > (int)m.charAt(i) ){
				return m;
			}
		}
		if( i == s.length() ){
			return s;
		}else{
			return m;
		}
		return m;
	}
	
}

Compiler output:
Main.java:14: error: method Check in class Main cannot be applied to given types;
			Check();
			^
  required: String,String
  found:    no arguments
  reason: actual and formal argument lists differ in length
Main.java:24: error: incompatible types: unexpected return value
				return s;
				       ^
Main.java:26: error: incompatible types: unexpected return value
				return m;
				       ^
Main.java:30: error: incompatible types: unexpected return value
			return s;
			       ^
Main.java:32: error: incompatible types: unexpected return value
			return m;
			       ^
Main.java:34: error: incompatible types: unexpected return value
		return m;
		       ^
6 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());	//????????°???
		String str;	//??\??????????????????
		String min;	//?????????????????????
		int r = 0;	//?????¨???????????????????????°???
		
		min = scan.next();
		for( int i = 1; i < n; i++ ){
			str = scan.next();
			Check();
		}
		
		return;
	}
	
	public static String Check(String s, String m){
		int i = 0;
		for( i = 0; i < s.length() && i < m.length(); i++ ){
			if( (int)s.charAt(i) < (int)m.charAt(i) ){
				return s;
			}else if( (int)s.charAt(i) > (int)m.charAt(i) ){
				return m;
			}
		}
		if( i == s.length() ){
			return s;
		}else{
			return m;
		}
		return m;
	}
	
}

Compiler output:
Main.java:14: error: method Check in class Main cannot be applied to given types;
			Check();
			^
  required: String,String
  found:    no arguments
  reason: actual and formal argument lists differ in length
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());	//????????°???
		String str;	//??\??????????????????
		String min;	//?????????????????????
		int r = 0;	//?????¨???????????????????????°???
		
		min = scan.next();
		for( int i = 1; i < n; i++ ){
			str = scan.next();
			min = Check(str, min);
		}
		
		return;
	}
	
	public static String Check(String s, String m){
		int i = 0;
		for( i = 0; i < s.length() && i < m.length(); i++ ){
			if( (int)s.charAt(i) < (int)m.charAt(i) ){
				return s;
			}else if( (int)s.charAt(i) > (int)m.charAt(i) ){
				return m;
			}
		}
		if( i == s.length() ){
			return s;
		}else{
			return m;
		}
		return m;
	}
	
}

Compiler output:
Main.java:34: error: unreachable statement
		return m;
		^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Main {

	public static void main(String[] args) {
		printAnswer();
	}

	private static void printAnswer() {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
			int count = Integer.valueOf(br.readLine());
			List<String> words = new ArrayList<>();

			for(int i = 0; i < count; i++){
				words.add(br.readLine());
			}
			Collections.sort(words);

			System.out.println(words.get(0));

		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

Compiler output:
Main.java:29: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.io.*;
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        String s[]=new String[n];
        for (int i=0;i<n;i++){
            String s[i]=sc.nextLine();
        }
        for (int i=0;i<n-1;i++){
            for (int j=i;j<n-1;j++){
                if (s[j].compareTo(s[j+1])<0){
                    String boo=s[j];
                    s[j]=s[j+1];
                    s[j+1]=boo;
                }
            }
        }
        System.out.println(s[n-1]);
    }
}

Compiler output:
Main.java:9: error: ']' expected
            String s[i]=sc.nextLine();
                     ^
Main.java:9: error: ';' expected
            String s[i]=sc.nextLine();
                      ^
2 errors
Language: Java

import java.util.*;

class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        String str = new String[n];
        
        for(int i = 0; i < n; i++){
            str[i] = scan.nextLine();
        }

        Array.sort(str);

        System.out.println(str[0]);
    }
}

Compiler output:
Main.java:7: error: incompatible types: String[] cannot be converted to String
        String str = new String[n];
                     ^
Main.java:10: error: array required, but String found
            str[i] = scan.nextLine();
               ^
Main.java:13: error: cannot find symbol
        Array.sort(str);
        ^
  symbol:   variable Array
  location: class Main
Main.java:15: error: array required, but String found
        System.out.println(str[0]);
                              ^
4 errors
Language: Java

#include <stdio.h>

void main (void); 





void main(void){
    int i=0;
    int x=0;
    int j = 0;
    char f[256]="z";
    char s1[256]="";
    scanf("%d",&x);


    for(j;j<x;j++){
        scanf("%s",s1);

        i=0;
        

        if(strcmp(f,s1)==1){
            strcpy(f,s1);

        }


    }
    printf("%s\n",f);
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:18: error: not a statement
    for(j;j<x;j++){
        ^
Main.java:9: error: unnamed classes are a preview feature and are disabled by default.
void main(void){
^
  (use --enable-preview to enable unnamed classes)
Main.java:9: error: <identifier> expected
void main(void){
              ^
Main.java:13: error: ']' expected
    char f[256]="z";
           ^
Main.java:14: error: ']' expected
    char s1[256]="";
            ^
Main.java:15: error: illegal start of expression
    scanf("%d",&x);
               ^
8 errors
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.util.Collections;
import java.util.Scanner;

public class eu {

    public static void main (String []args){
	
	Scanner sc = new Scanner(System.in);
	final int n = sc.nextInt();
	List<String> lst = new ArrayList<String>();
	for(int i=0;i<n + 1;++i){
	    String line = sc.nextLine();
	    if(line.equals("")) continue;
	    lst.add(line);
	}

	Collections.sort(lst);
	System.out.println(lst.get(0));
	
	sc.close();
    }
}

Compiler output:
Main.java:6: error: class eu is public, should be declared in a file named eu.java
public class eu {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args) throws IOException{
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String ans = sc.next();
    for (int i = 1 ; i < n ; i++){
      String in = sc.next();
      if (in.compareTo(ans) < 0)
        ans = in;
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
  public static void main(String[] args) throws IOException{
                                                ^
  symbol:   class IOException
  location: class Main
1 error
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

class Main
{
	public static void main(String args[])
	{

		Scanner scan= new Scanner(System.in);
		int n = scan.nextInt();
		List<String> word = new ArrayList<String>();
		for(int i=0; i<n; i++)
		{
			word.add(scan.next());
		}
		Collections.sort(word);
		System.out.println(word[0]);
	}
}

Compiler output:
Main.java:19: error: array required, but List<String> found
		System.out.println(word[0]);
		                       ^
1 error
Language: Java

import java.util.Scanner;
import java.util.ArrayList;

public class Main {
	public static void main(String args[]){
		Scanner in=new Scanner(System.in);
		String s;
		int sum=0;
		int n=in.nextInt();
		String ans,tmp;
		tmp=in.next();
		while (in.hasNext()) {
			s=in.next();
			if (tmp.compareTo(s)>0) {
			ans=tmp;
			}
			tmp=s;
		}
		System.out.printf("%s%n",ans);
	}
}

Compiler output:
Main.java:19: error: variable ans might not have been initialized
		System.out.printf("%s%n",ans);
		                         ^
1 error
Language: Java

import java.util.Scanner;

public class Dictionary{
    public static void main(String[] args){

	Scanner sc = new Scanner(System.in);
	String word[];
	String temp;
	int i;

	    int N = sc.nextInt();
	    word = new String[N];

	    for(i = 0; i < N; i++){
		word[i] = sc.next();
	    }

	    for(i = N - 1; i > 0; i--){
		if(word[i - 1].compareTo(word[i]) > 0){
		    temp = word[i].trim();
		    word[i] = word[i - 1].trim();
		    word[i - 1] = temp.trim();
		}
	    }
	    System.out.printf("%s\n", word[0]);
    }
}

Compiler output:
Main.java:3: error: class Dictionary is public, should be declared in a file named Dictionary.java
public class Dictionary{
       ^
1 error
Language: Java

import java.util.Scanner;
import java.io.*;

public class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	String beg = "zzz";
	int n = sc.nextInt();
	for(int i=0;i<n;i++){
	    //  try{
		String line = reader.readLine();
		if(i == 0) beg = line;
		else if(line.compareTo(beg) < 0) beg = line;
		// }catch(IOException e){
		//	System.out.println(e);
		// }
	  	
	}
	System.out.println(beg);
    }   
}

Compiler output:
Main.java:12: error: unreported exception IOException; must be caught or declared to be thrown
		String line = reader.readLine();
		                             ^
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String str[] = new String[n];
    for (i = 0; i < n; i++);
      str[i] = sc.next();
      if (String strtop == null || strtop > str[i]) {
        strtop = str[i]
      }
    }
    System.out.println(strtop);
  }
}

Compiler output:
Main.java:9: error: ')' expected
      if (String strtop == null || strtop > str[i]) {
                ^
Main.java:9: error: not a statement
      if (String strtop == null || strtop > str[i]) {
                                ^
Main.java:9: error: ';' expected
      if (String strtop == null || strtop > str[i]) {
                                                  ^
Main.java:10: error: ';' expected
        strtop = str[i]
                       ^
Main.java:13: error: <identifier> expected
    System.out.println(strtop);
                      ^
Main.java:13: error: <identifier> expected
    System.out.println(strtop);
                             ^
Main.java:15: error: class, interface, enum, or record expected
}
^
7 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String str[] = new String[n];
    for (i = 0; i < n; i++);
      str[i] = sc.next();
      if (String strtop.equals("null") || strtop > str[i]) {
        strtop = str[i]
      }
    }
    System.out.println(strtop);
  }
}

Compiler output:
Main.java:9: error: ')' expected
      if (String strtop.equals("null") || strtop > str[i]) {
                ^
Main.java:9: error: not a statement
      if (String strtop.equals("null") || strtop > str[i]) {
                                       ^
Main.java:9: error: ';' expected
      if (String strtop.equals("null") || strtop > str[i]) {
                                                         ^
Main.java:10: error: ';' expected
        strtop = str[i]
                       ^
Main.java:13: error: <identifier> expected
    System.out.println(strtop);
                      ^
Main.java:13: error: <identifier> expected
    System.out.println(strtop);
                             ^
Main.java:15: error: class, interface, enum, or record expected
}
^
7 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String str[] = new String[n];
    for (i = 0; i < n; i++);
      str[i] = sc.next();
      if (i == 0 || strtop > str[i]) {
        strtop = str[i]
      }
    }
    System.out.println(strtop);
  }
}

Compiler output:
Main.java:10: error: ';' expected
        strtop = str[i]
                       ^
Main.java:13: error: <identifier> expected
    System.out.println(strtop);
                      ^
Main.java:13: error: <identifier> expected
    System.out.println(strtop);
                             ^
Main.java:15: error: class, interface, enum, or record expected
}
^
4 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String str[] = new String[n];
    for (i = 0; i < n; i++);
      str[i] = sc.next();
      if (i == 0 || strtop > str[i]) {
        strtop = str[i];
      }
    }
    System.out.println(strtop);
  }
}

Compiler output:
Main.java:13: error: <identifier> expected
    System.out.println(strtop);
                      ^
Main.java:13: error: <identifier> expected
    System.out.println(strtop);
                             ^
Main.java:15: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String str[] = new String[n];
    for (i = 0; i < n; i++);
      str[i] = sc.next();
      if (i == 0 || strtop > str[i]) {
        String strtop = str[i];
      }
    }
    System.out.println(strtop);
  }
}

Compiler output:
Main.java:13: error: <identifier> expected
    System.out.println(strtop);
                      ^
Main.java:13: error: <identifier> expected
    System.out.println(strtop);
                             ^
Main.java:15: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String str[] = new String[n];
    for (i = 0; i < n; i++) {
      str[i] = sc.next();
      if (i == 0 || strtop > str[i]) {
        String strtop = str[i];
      }
    }
    System.out.println(strtop);
  }
}

Compiler output:
Main.java:7: error: cannot find symbol
    for (i = 0; i < n; i++) {
         ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
    for (i = 0; i < n; i++) {
                ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
    for (i = 0; i < n; i++) {
                       ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
      str[i] = sc.next();
          ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
      if (i == 0 || strtop > str[i]) {
          ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
      if (i == 0 || strtop > str[i]) {
                    ^
  symbol:   variable strtop
  location: class Main
Main.java:9: error: cannot find symbol
      if (i == 0 || strtop > str[i]) {
                                 ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
        String strtop = str[i];
                            ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
    System.out.println(strtop);
                       ^
  symbol:   variable strtop
  location: class Main
9 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String str[] = new String[n];
    for (int i = 0; i < n; i++) {
      str[i] = sc.next();
      if (i == 0 || strtop > str[i]) {
        String strtop = str[i];
      }
    }
    System.out.println(strtop);
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
      if (i == 0 || strtop > str[i]) {
                    ^
  symbol:   variable strtop
  location: class Main
Main.java:13: error: cannot find symbol
    System.out.println(strtop);
                       ^
  symbol:   variable strtop
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String str[] = new String[n];
    String strtop;
    for (int i = 0; i < n; i++) {
      str[i] = sc.next();
      if (i == 0 || strtop > str[i]) {
        strtop = str[i];
      }
    }
    System.out.println(strtop);
  }
}

Compiler output:
Main.java:10: error: bad operand types for binary operator '>'
      if (i == 0 || strtop > str[i]) {
                           ^
  first type:  String
  second type: String
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String str[] = new String[n];
    String strtop;
    for (int i = 0; i < n; i++) {
      str[i] = sc.next();
      if (i == 0 || str[i].compareTo(strtop) < 0) {
        strtop = str[i];
      }
    }
    System.out.println(strtop);
  }
}

Compiler output:
Main.java:10: error: variable strtop might not have been initialized
      if (i == 0 || str[i].compareTo(strtop) < 0) {
                                     ^
Main.java:14: error: variable strtop might not have been initialized
    System.out.println(strtop);
                       ^
2 errors
Language: Java

import java.util.Arrays;
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] words = new String[n];
		if (sc.hasNext()) {
			words[i] = sc.nextLine();
		}
		Arrays.sort(words);
		System.out.println(words[0]);
	}
}

Compiler output:
Main.java:10: error: cannot find symbol
			words[i] = sc.nextLine();
			      ^
  symbol:   variable i
  location: class Main
1 error
Language: C

#include <stdio.h>

int main(void){
	int number, i, cnt = 0;
	scanf("%d", &number);

	int esc[number];
	char dic[number][256], j;
	for(i = 0;i < number; i++){
		scanf("%s", &dic[i][0]);
		esc[i] = dic[i][0];
	}

	j = dic[0][0];
	for(i = 1;i < number; i++){
		if(j > dic[i][0]){
			j = dic[i][0];
			cnt = i;


	}

	printf("%s\n", &dic[cnt][0]);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C

#include<stdio.h>
#include<string.h>
using namespace std;

int main(){
int n;
char minstr[20];
char str[20];
scanf("%d",&n);
for(int i=0;i<n;i++){
	scanf("%s",str);
	if(i==0)strcpy(minstr,str);
	if((strcmp(str,minstr)<0))strcpy(minstr,str);
}
printf("%s\n",minstr);
system("pause");
return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'using'
    3 | using namespace std;
      | ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    3 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:16:1: error: implicit declaration of function 'system' [-Wimplicit-function-declaration]
   16 | system("pause");
      | ^~~~~~
Language: C

#include<stdio.h>
#include<string.h>

int main(void)
{
	char s1[20], s2[20];
	int i, j;
	int n;
	
	scanf("%d", &n);
	
	for (i = 0; i < n; i++) {
		
		scanf("%s", s1);
		
		if (i == 0) {
			strcpy(s2, s1);
			continue;
		}
		
		j = 0;
		
		while (s2[j] != '\0') {
			if (s1[j] < s2[j]) {
				strcpy(s2, s1);
				break;
			}
			else if (s1[j] == s2[j]) {
			}
			
			else {
				break;
			}
			
			j++;
		}
	}
	
	printf("%s\n", s2);
	
	return (0);

Compiler output:
main.c: In function 'main':
main.c:41:9: error: expected declaration or statement at end of input
   41 |         return (0);
      |         ^~~~~~
Language: C

#include <cstdio>
#include <iostream>
#include <string>
using namespace std;

int main(void)
{
  string str, string;
  int n;

  cin >> n;

  cin >> string;
  for (int i = 1; i < n; i++){
    cin >> str;
    if (str <= string){
      string = str;
    }
  }

  cout << string << endl;

  return (0);
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(void){
    int n,i,j=0,k,l=0;
    char a[100]={0},b[100]={0},c[100]={0};
    scanf("%d",&n);
    while(scanf("%c",&a[j])!=EOF){
        b[j]=a[j];
        j++;
    }
    for(i=0;i<n-1;i++){
        k=1;
        c[100]={0};
        scanf("%c",&c[0]);
        if(b[0]-'a'>c[0]-'a'){
            b[0]=c[0];
            while(scanf("%c",&c[k])!=EOF){
                b[k]=c[k];
                k++;
            }
        }
        else if(b[0]==c[0]){
            b[0]=c[0];
            while(scanf("%c",&c[k]-'a')!=b[k]-'a'){
                b[k]=c[k];
                k++;
            }
            if(b[k]-'a'>c[k]-'a'){
                b[k]=c[k];
                k++;
                while(scanf("%c",&c[k])!=EOF){
                    b[k]=c[k];
                }
            }
            else{
                while(scanf("%c",&c[k])!=EOF){
                }
            }
        }
        else{
             while(scanf("%c",&c[k])!=EOF){
            }
        }
    }
    while(b[l]!=EOF){
        printf("%c",b[l]);
        l++;
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:16: error: expected expression before '{' token
   12 |         c[100]={0};
      |                ^
Language: C

#include<stdio.h>
#include<string>
int main(){
	int n,j,i,k;
	char moji[22],top[22]={'z'};
	scanf("%d",&n);
	for(i=0;i<=n;i++){
		for(j=0;j<=n;){
		scanf("%c",&moji[j]);
			if(moji[j]=='\n'){
				if(moji[0]-'a'<top[0]-'a'){
					strncpy( top, moji, j );
//					top[j]='\0';
					break;
				}else if(moji[0]-'a'==top[0]-'a'){
					for(k=1;k<20;k++){
						if(moji[k]-'a'<top[k]-'a'){
							strncpy( top,moji,j);
//							top[j]='\0';
							break;
						}
						else if(moji[k]-'a'==top[k]-'a'){}
						else{break;}
					}
				}else{break;}
			}
		j++;
		}
	}
	printf("%s\n",top);
	return 0;
}

Compiler output:
main.c:2:9: fatal error: string: No such file or directory
    2 | #include<string>
      |         ^~~~~~~~
compilation terminated.
Language: C

import java.util.Scanner;

class test{

    public static void main(String[] args){

	int x,i,j;
	String[] data = new String[1000];
	String stock;
    
	Scanner scan = new Scanner(System.in);


	x = scan.nextInt();

	for(i = 0; i < x; i++){
	    data[i] = scan.next();
	}

	for(i = 0; i < x - 1; i++){
	    for(j = 1; j < x; j++){
		if(data[i].compareTo(data[j]) > 0){
		    stock = data[i];
		    data[i] = data[j];
		    data[j] = stock;
		}
	    }
	}
	System.out.println(data[0]);
    }
}
		

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:3:1: error: unknown type name 'class'
    3 | class test{
      | ^~~~~
main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | class test{
      |           ^
Language: C

include <string.h>
int main(void)
{
	int n,i;
	char a1[21],a2[21];
	scanf("%d",&n);
	scanf("%s",a1);
	scanf("%s",a2);
	if(a2 < a1)
	{
		strcpy(a1,a2);
	}
	for(i=0;i<n-2;i++)
	{
		scanf("%s",a2);
		if(a2 < a1)
		{
			strcpy(a1,a2);
		}
	}
	printf("%s\n",a1);
	return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <string.h>
      |         ^
Language: C

#include <stdio.h>

int main()
{
	char word[21],minword[21];
	char min;
	int i,n;
	
	scanf("%d",&n);
	gets(word);
	min = word[0];
	
	for(i=1;i<n;i++){
		gets(word);
		if(word[0]<min){
			min = word[0];
			for(j=0;j<21;j++){
				minword[j] = word[j];
			}
		}
	}
	
	printf(minword);
	printf("\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   10 |         gets(word);
      |         ^~~~
      |         fgets
main.c:17:29: error: 'j' undeclared (first use in this function)
   17 |                         for(j=0;j<21;j++){
      |                             ^
main.c:17:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

word=[]
n=gets.to_i

1.upto(n) do
	word<<gets
end

puts word.sort![1]

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | word=[]
      | ^~~~
main.c:1:1: error: type defaults to 'int' in declaration of 'word' [-Wimplicit-int]
main.c:1:6: error: expected expression before '[' token
    1 | word=[]
      |      ^
main.c:4:1: error: invalid suffix "upto" on floating constant
    4 | 1.upto(n) do
      | ^~~~~~
Language: C

#include <stdio.h>
#include <string.h>
int main(){
  int i,j,n;
  char s[1000][21],tmp[21];
  scanf("%d",n);
  for(i=0;i<n;i++){
    scanf("%s",s[i]);
  }
  for(i=0;i<n-1;i++){
    for(j=n-1;j>i;j--){
      if(strcmp(s) < 0){
	strcpy(tmp,s[j]);
	strcpy(s[j],s[j-1]);
	strcpy(s[j-1],tmp);
      }
    }
  }
  printf("%s\n",s[0]);
  return (0);
}

Compiler output:
main.c: In function 'main':
main.c:12:17: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   12 |       if(strcmp(s) < 0){
      |                 ^
      |                 |
      |                 char (*)[21]
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char (*)[21]'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:12:10: error: too few arguments to function 'strcmp'
   12 |       if(strcmp(s) < 0){
      |          ^~~~~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
Language: C

#include <stdio.h>
#include <string.h>
int main(){
  int i,j,n,k;
  char s[1000][21],tmp[21];
  scanf("%d",n);
  for(i=0;i<n;i++){
    scanf("%s",s[i]);
  }
  for(i=0;i<n-1;i++){
    for(j=n-1;j>i;j--){
      k=strcmp(s);
      if(k < 0){
	strcpy(tmp,s[j]);
	strcpy(s[j],s[j-1]);
	strcpy(s[j-1],tmp);
      }
    }
  }
  printf("%s\n",s[0]);
  return (0);
}

Compiler output:
main.c: In function 'main':
main.c:12:16: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   12 |       k=strcmp(s);
      |                ^
      |                |
      |                char (*)[21]
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char (*)[21]'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:12:9: error: too few arguments to function 'strcmp'
   12 |       k=strcmp(s);
      |         ^~~~~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
Language: C

#include <stdio.h>
#include <string.h>
int main(){
  int i,j,n,k;
  char s[1000][21],tmp[21];
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s[i]);
  }
  for(i=0;i<n-1;i++){
    for(j=n-1;j>i;j--){
      k=strcmp(s);
      if(k < 0){
	strcpy(tmp,s[j]);
	strcpy(s[j],s[j-1]);
	strcpy(s[j-1],tmp);
      }
    }
  }
  printf("%s\n",s[0]);
  return (0);
}

Compiler output:
main.c: In function 'main':
main.c:12:16: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   12 |       k=strcmp(s);
      |                ^
      |                |
      |                char (*)[21]
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char (*)[21]'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:12:9: error: too few arguments to function 'strcmp'
   12 |       k=strcmp(s);
      |         ^~~~~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
Language: C

#include <stdio.h>
#include <string.h>
int main(){
  int i,j,n,k;
  char s[100][21],tmp[21];
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s[i]);
  }
  for(i=0;i<n-1;i++){
    for(j=n-1;j>i;j--){
      k=strcmp(s);
      if(k < 0){
	strcpy(tmp,s[j]);
	strcpy(s[j],s[j-1]);
	strcpy(s[j-1],tmp);
      }
    }
  }
  printf("%s\n",s[0]);
  return (0);
}

Compiler output:
main.c: In function 'main':
main.c:12:16: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   12 |       k=strcmp(s);
      |                ^
      |                |
      |                char (*)[21]
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char (*)[21]'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:12:9: error: too few arguments to function 'strcmp'
   12 |       k=strcmp(s);
      |         ^~~~~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~