+ 2

Why is the output of this code "world" ?đŸ€”

#include <stdio.h> int main() { printf (6 + "hello world"); return 0; }

23rd Jan 2019, 5:14 PM
Mihai C
Mihai C - avatar
1 Answer
+ 3
Because when you added +6 You are telling the console to skip the first 6 chars in the hello world string if you do + 1 for example it will only skip the first char so it would be "ello world"
23rd Jan 2019, 5:24 PM
Sterben
Sterben - avatar