Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Perl and C don't always mix well

by Sweeper (Pilgrim)
on Nov 02, 2001 at 11:33 UTC ( [id://122760]=note: print w/replies, xml ) Need Help??


in reply to Perl and C don't always mix well

It reminds me that, a few months ago, I wanted to write an "Hello world" program in C. It took me three compiles before executing it. The successive attempts were:
#include <stdlib.h> #include <stdio.h> void main () { printf "Hello world\n" }
Oops, forgot that you need a semi-colon, even if followed by a closing brace.
#include <stdlib.h> #include <stdio.h> void main () { printf "Hello world\n"; }
What's wrong now? (time passes...) Ah yes, you need parentheses.
#include <stdlib.h> #include <stdio.h> void main () { printf("Hello world\n"); }
Yeah, it works!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://122760]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-25 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found