memesearch
The URL That Compiles in C

The URL That Compiles in C

Download Find similar pictures
Text on the meme
Here is a silly little C puzzle: #include <stdio.h> int main(void) { https://susam.net/ printf("hello, world\n"); return 0; } This code compiles and runs successfully. $ c99 hello.c && ./a.out hello, world However, the C99 standard draft does not mention anywhere that a URL is a valid syntactic element in C. How does this code work then?
What it means

A screenshot presents a C program containing a bare URL, followed by a successful compilation and “hello, world” output. The joke is that in C, the URL is parsed as a label named “https:” followed by a comment beginning with “//”, so the apparently invalid line is ignored. EN: A screenshot presents a C program containing a bare URL, followed by a successful compilation and “hello, world” output. The joke is that in C, the URL is parsed as a label named “https:” followed by a comment beginning with “//”, so the apparently invalid line is ignored.

Objects
Tags
Source
Type
image
Size
800×499 · 43.0 KiB
Mood
clever, absurd
Language
en
Added