HelloWorld.txt: file not recognized: File format not recognized collect2: ld returned 1 exit status
???!?!?!?!?... Yeah, by mistake i saved it as .txt file. Fine!. Immediately I renamed it as HelloWorld.c, Now again I tried compiling it. This time I couldn't even remember what this error means. This is what I got,
HelloWorld.c:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘main’
Now I tried replacing init with int.... yeah, i ve typed init in front of main, instead of int. Again I tried compiling, but error is still the same. Now I opened a C code which i typed long back and saw the difference. I noticed one thing. #include
HelloWorld.c: In function ‘main’:
HelloWorld.c:3: error: ‘System’ undeclared (first use in this function)
HelloWorld.c:3: error: (Each undeclared identifier is reported only once
HelloWorld.c:3: error: for each function it appears in.)
System undeclared ??? Where did System came in a C Code. Thanks to Java.
ok.... I ve typed System.out.println . I changed it to printf. I guess Im almost done.
This time when i compiled, I didnt get any error, But a warning,
HelloWorld.c:3: warning: incompatible implicit declaration of built-in function ‘printf’
I again retyped, #include
Finally, my code was compiled successfully, to print the Hello World!.
This was the same program what I copied from blackboard almost 7 years back when i started learning C for the firt time. That time, without even knowing what these statements actually mean, it just took few seconds to modify the HelloWorld program to print my Name. And now it took almost 10 minutes to do the same program, knowing the meaning for each line.
This is the first version of the C(think so!) code what I type,
This is the first version of the C(think so!) code what I type,

Final Version is...