Wulf0123
Posts: 19
Joined: Fri May 24, 2013 3:46 am

C Hello World

Sat Jan 11, 2014 8:15 pm

So I seem to be having a problem with C on my Pidora. When I try to write a simple hello world, my output is not displayed on the terminal. Has anybody else had that problem?

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: C Hello World

Sat Jan 11, 2014 8:21 pm

Code: Select all

#include <stdlib.h>
#include <stdio.h>

void main() {

 printf( "Hello World!\r\n");
}
There's not a lot that can go wrong with that one.

Compile it with:
cc -o HelloW HelloW.c
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Wulf0123
Posts: 19
Joined: Fri May 24, 2013 3:46 am

Re: C Hello World

Sat Jan 11, 2014 8:29 pm

I've been trying to use gcc which apparently doesn't work. cc works, thanks

Return to “Pidora / Fedora”