Using Dev C++ I was doing some fun with C and got this :
#include<stdio.h>
main()
{
printf("Hello
world" );
}
^^^^ here I thought output would be like "Hello (with spaces) World" but Errors :
C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c In function 'main':
5 10 C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Warning] missing terminating " character
5 3 C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Error] missing terminating " character
6 8 C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Warning] missing terminating " character
6 1 C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Error] missing terminating " character
6 1 C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Error] 'world' undeclared (first use in this function)
6 1 C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Note] each undeclared identifier is reported only once for each function it appears in
7 1 C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Error] expected ')' before '}' token
7 1 C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Error] expected ';' before '}' token
but when i added a \ it worked :
#include<stdio.h>
main()
{
printf("Hello \
World" );
}
Without any warnings and errors. What Magic of '\' is this ? And do any other soccery exists , please let me know .