Language: C

char s[100][101];h;r[100],R,c[100],C,i,j;
main(w){scanf("%d%d",&h,&w);for(i=h;i;)scanf("%s",s[--i]);
for(i=0;i<h;i++){int x=1;for(j=0;j<w;j++)if(s[i][j]=='#')x=0;if(x)r[R++]=i;}
for(j=0;j<w;j++){int x=1;for(i=0;i<h;i++)if(s[i][j]=='#')x=0;if(x)c[C++]=j;}
for(i=0;i<R;i++){for(j=0;j<C;j++)putchar(s[i][j];puts("");}
}

Compiler output:
main.c:1:18: warning: data definition has no type or storage class
    1 | char s[100][101];h;r[100],R,c[100],C,i,j;
      |                  ^
main.c:1:18: error: type defaults to 'int' in declaration of 'h' [-Wimplicit-int]
main.c:1:20: warning: data definition has no type or storage class
    1 | char s[100][101];h;r[100],R,c[100],C,i,j;
      |                    ^
main.c:1:20: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
main.c:1:27: error: type defaults to 'int' in declaration of 'R' [-Wimplicit-int]
    1 | char s[100][101];h;r[100],R,c[100],C,i,j;
      |                           ^
main.c:1:29: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
    1 | char s[100][101];h;r[100],R,c[100],C,i,j;
      |                             ^
main.c:1:36: error: type defaults to 'int' in declaration of 'C' [-Wimplicit-int]
    1 | char s[100][101];h;r[100],R,c[100],C,i,j;
      |                                    ^
main.c:1:38: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
    1 | char s[100][101];h;r[100],R,c[100],C,i,j;
      |                                      ^
main.c:1:40: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
    1 | char s[100][101];h;r[100],R,c[100],C,i,j;
      |                                        ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(w){scanf("%d%d",&h,&w);for(i=h;i;)scanf("%s",s[--i]);
      | ^~~~
main.c: In function 'main':
main.c:2:1: error: type of 'w' defaults to 'int' [-Wimplicit-int]
main.c:2:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    2 | main(w){scanf("%d%d",&h,&w);for(i=h;i;)scanf("%s",s[--i]);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | char s[100][101];h;r[100],R,c[100],C,i,j;
main.c:2:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    2 | main(w){scanf("%d%d",&h,&w);for(i=h;i;)scanf("%s",s[--i]);
      |         ^~~~~
main.c:2:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:34: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
    5 | for(i=0;i<R;i++){for(j=0;j<C;j++)putchar(s[i][j];puts("");}
      |                                  ^~~~~~~
main.c:5:34: note: include '<stdio.h>' or provide a declaration of 'putchar'
main.c:5:49: error: expected ')' before ';' token
    5 | for(i=0;i<R;i++){for(j=0;j<C;j++)putchar(s[i][j];puts("");}
      |                                         ~       ^
      |                                                 )
main.c:5:59: error: expected ';' before '}' token
    5 | for(i=0;i<R;i++){for(j=0;j<C;j++)putchar(s[i][j];puts("");}
      |                                                           ^
      |                                                           ;