memesearch
Recursive Quotation Mark Solution

Recursive Quotation Mark Solution

Download Find similar pictures
Text on the meme
In an interview I was asked Print a quotation mark using the printf() function I was overwhelmed. Even in their office there was a computer and they told me to try it. I tried like this: void main() { printf("Printing quotation mark \" "); } but as I suspected it doesn't compile. When the compiler gets the first " it thinks it is the end of string, which is not. So how can I achieve this? #include <stdio.h> int quot(int c) { if (c == '"') { return c; } else return quot(c+1); } int main(void) { printf("Printing quotation mark %c \n", quot(0)); }
What it means

A programmer is asked to print a quotation mark using the printf() function. Instead of escaping the character, they write a recursive C function that searches through character codes until it finds a quotation mark, humorously overengineering a trivial task and embodying cringe coding. EN: A programmer is asked to print a quotation mark using the printf() function. Instead of escaping the character, they write a recursive C function that searches through character codes until it finds a quotation mark, humorously overengineering a trivial task and embodying cringe coding.

Objects
Tags
Source
Type
image
Size
670×535 · 43.4 KiB
Mood
cringe, absurd
Language
en
Added

Similar memes