Cheating Network
 
 

Go Back   Cheating Network > General Computing > Programming > Tutorials / Releases
Reload this Page Hello World in C



Tutorials / Releases

This is a discussion about Hello World in C within the Tutorials / Releases section, where you will Any tutorials or releases should be posted here.



Reply
 
LinkBack Thread Tools Display Modes
Old 04-09-2008, 04:30 AM   #1 (permalink)
CN Owner
 
Chewy's Avatar
 
Join Date: Dec 2007
Location: The deep end of CN
Posts: 2,512
Reputation: 61
Chewy will become famous soon enough
Send a message via AIM to Chewy
Default Hello World in C

Well if I get the site I want better bots made in a good language so we can utilize the exploits more. Here is a simple thing you can do in C to have a window say "Hello World"

Ok C is constructed of functions and header(.h) files

In our application we are going to use stdio.h so include it at the top of the code as below

Code:
#include <stdio.h>
This just tells the program to include this file.

now we need our MAIN function. The Main function in C is simply called main The function should be added bellow the include and should look like this

Code:
int main(void) {

}

Now we have our basic C structure Lets make it talk. In the main function add the printf() function

it should look like this

Code:
printf("Hello World\n");
You can replace Hello world with anything you'd like. printf tell it to display the following(Whats inside the ("")) and next to hello world is \n which tells it to print a new line after.

You now have you're first ever complete C program.

The full code should be similar to below

Code:
#include<stdio.h>

int main(void) {
      printf("Hello World");
}
notice the ; at the end of the printf() function This is the same as PHP And must be at the end of each line unless it is an include or if statement. It's the syntax

Well this is the simplest thing you'll ever make in C, should get familiar with C!
__________________
Want to donate to Cheating Network? Click here to do so, or just click the button below!


Chewy is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-31-2008, 02:20 PM   #2 (permalink)
Junior Member
 
Join Date: May 2008
Posts: 1
Reputation: 0
esoterik is an unknown quantity at this point
Default

whats the difference between printf and cout
esoterik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-31-2008, 02:40 PM   #3 (permalink)
BuM
SuperUser
 
BuM's Avatar
 
Join Date: Dec 2007
Posts: 208
Reputation: 15
BuM is on a distinguished road
Default

cout is C++
BuM is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
world


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cheating in the REAL WORLD MagicalCanOfSprite Chit Chat 116 11-24-2008 03:33 PM
World of Warcraft Activation Key i push pencils Chit Chat 7 05-16-2008 04:59 PM
Hello World thatoneguy Introduce Yourself 3 03-12-2008 05:17 PM
Xbox 360 Around The World! 2+2=OVER9000 Gaming 9 02-17-2008 09:42 PM
Pirate The World itami Other / Unlisted Networks 7 01-14-2008 07:29 PM


Powered by vBulletin
Copyright © 2000-2008 Jelsoft Enterprises Limited.
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.