3 added 51 characters in body
source | link

C (SDL2 library) 113 8888 84

(-4 chars due to @AppleShell 's help)

Yes. it compiles.

mainm[3];main(){int m[3];SDL_InitSDL_Init(32);SDL_GetDesktopDisplayMode(0,m);printf("%dx%d",m[1],m[2]);}

Run with : gcc snippet.c -lSDL2 && ./a.out

C (SDL2 library) 113 88

Yes. it compiles.

main(){int m[3];SDL_Init(32);SDL_GetDesktopDisplayMode(0,m);printf("%dx%d",m[1],m[2]);}

Run with : gcc snippet.c -lSDL2 && ./a.out

C (SDL2 library) 113 88 84

(-4 chars due to @AppleShell 's help)

Yes. it compiles.

m[3];main(){SDL_Init(32);SDL_GetDesktopDisplayMode(0,m);printf("%dx%d",m[1],m[2]);}

Run with : gcc snippet.c -lSDL2 && ./a.out

2 deleted 25 characters in body
source | link

C (SDL2 library) 113113 88

Yes. it compiles.

#include <SDL.h>
main(){SDL_DisplayModeint m;SDL_Initm[3];SDL_Init(32);SDL_GetDesktopDisplayMode(0,&mm);printf("%dx%d",m.wm[1],m.hm[2]);}

compile and runRun with : gcc -I/usr/include/SDL2 snippet.c -lSDL2 && ./a.out

C (SDL2 library) 113

#include <SDL.h>
main(){SDL_DisplayMode m;SDL_Init(32);SDL_GetDesktopDisplayMode(0,&m);printf("%dx%d",m.w,m.h);}

compile and run with : gcc -I/usr/include/SDL2 snippet.c -lSDL2 && ./a.out

C (SDL2 library) 113 88

Yes. it compiles.

main(){int m[3];SDL_Init(32);SDL_GetDesktopDisplayMode(0,m);printf("%dx%d",m[1],m[2]);}

Run with : gcc snippet.c -lSDL2 && ./a.out

1
source | link

C (SDL2 library) 113

#include <SDL.h>
main(){SDL_DisplayMode m;SDL_Init(32);SDL_GetDesktopDisplayMode(0,&m);printf("%dx%d",m.w,m.h);}

compile and run with : gcc -I/usr/include/SDL2 snippet.c -lSDL2 && ./a.out