I am learning c pragramming and when I try to print "Hello World" in quotation I get an error:
id returned 1 exit status
Here is my code, I am using codeblock:
#include <stdio.h>
int main()
{
printf("\"Hello World\" ");
return 0;
}
I am learning c pragramming and when I try to print "Hello World" in quotation I get an error:
id returned 1 exit status
Here is my code, I am using codeblock:
#include <stdio.h>
int main()
{
printf("\"Hello World\" ");
return 0;
}
error: id returned 1 exit status
^
should be "l", not "i"
I believe it's ld
, not id
. Code::Blocks uses GCC as compiler, and this is extremely likely that you did not close the running program before trying to compile it again.
Generally, ld
(ld.exe
on Windows) returns 1 when it can't access required files. This usually includes
Access denied
)Your program looks completely fine, so the second point should not hit. In usual cases, it's impossible for ld
to fail to open the object file (unless you have a faulty drive and a dirty filesystem), so the first point is also nearly impossible. Now we get to the third point.
A simple Google search gives a full page of the same answer: You forgot to close the program, before trying to re-compile.
That's all.