All in one forum  - Applications | Games | E-Books | Music, Movies & Videos | Mobile Stuff | Live Discussions | Webmaster Stuff | Many More | Community to Hang Out and Stick to
Search Today's Posts Mark Forums Read

Go Back   Home > Tutorial Section > Programming > C and C++
Reload this Page C Functions
Forgot Password? Join Us!
C and C++ Post your C and C++ Related Tutorial Here

Notices
Your link here Your link here Your link here Your link here Your link here

Your Ad Here


Rate This Thread - C Functions.

Post New Thread Reply
Bookmarks
 
LinkBack Thread Tools Display Modes
Old 01-04-2008, 05:12 PM   #1 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,312
Casino Cash: $1074070

Total Points: 236,898,635,045.29
Donate

Reputation: 93163
KoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond repute


Awards Showcase
Administrator Of the Month Of Jan 
Total Awards: 1
Post C Functions



For Download Links U need to Press Thanks Button
My Goal 2: (Complete 10000)

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 3 Users Say Thank You to KoOL For This Useful Post:
jeet_down (07-28-2008), SERVUS (06-20-2008), Snipper (08-01-2008)
Click here to Donate to remove the Adverts.
Your Ad Here
Old 01-04-2008, 05:12 PM   #2 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,312
Casino Cash: $1074070

Total Points: 236,898,635,045.29
Donate

Reputation: 93163
KoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond repute


Awards Showcase
Administrator Of the Month Of Jan 
Total Awards: 1
Function atof()

Function atof is used to convert a string into a float. It stands for ASCII to float, and is pronounced A to F. The string must contain a floating-point number in character format (i.e. char string[] = "12.43"). This is what a call to atof should look like.
float_var = atof( string );
The string passed in is converted to a float, which is then returned by the function. A float variable is needed to store the return value of atof. If the string does not contain a float, or it has other garbage atof will return zero. To use atof you must include the stdlib.h header file.


For Download Links U need to Press Thanks Button
My Goal 2: (Complete 10000)

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Click here to Donate to remove the Adverts.
Your Ad Here
Old 01-04-2008, 05:12 PM   #3 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,312
Casino Cash: $1074070

Total Points: 236,898,635,045.29
Donate

Reputation: 93163
KoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond repute


Awards Showcase
Administrator Of the Month Of Jan 
Total Awards: 1
Function atoi()

Function atoi is used to convert a string that has numerical characters into an integer. In fact atoi stands for ASCII to Integer. It is pronounced A to I. The format is simple.
int_var = atoi( string );
As you can see, atoi takes a string as a parameter. It examines the string then returns an integer value. That value is the integer version of the string. You need an integer variable to catch the return value. If the string you pass does not contain an integer or has other weird stuff in it, atoi will return zero. To use atoi you must include the stdlib.h header file.


For Download Links U need to Press Thanks Button
My Goal 2: (Complete 10000)

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2008, 05:12 PM   #4 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,312
Casino Cash: $1074070

Total Points: 236,898,635,045.29
Donate

Reputation: 93163
KoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond repute


Awards Showcase
Administrator Of the Month Of Jan 
Total Awards: 1
Function exit()

Function exit is used to bail out of a program at any time. This function can be put anywhere. If the program flow gets to this command, the program will halt then and there. Even if it is nested down a dozen layers the program will quit when it gets there. The format looks like this:
exit( n );
The single parameter is usually zero. It can be any integer though. This parameter is passed to the operating system when the program quits. Some operating systems may want integers in a set range. For example DOS likes to see numbers between 0 and 255. On a Sun, the values can be negative, but I'm not sure of the range. The operating system may or may not care about the value though. This function is usually used to screen user input. If they give you input that will mess up your program, you can use an exit function to bail out on them. Depending on your compiler you will either need to include stdio.h, or stdlib.h.


For Download Links U need to Press Thanks Button
My Goal 2: (Complete 10000)

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Click here to Donate to remove the Adverts.
Your Ad Here
Old 01-04-2008, 05:13 PM   #5 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,312
Casino Cash: $1074070

Total Points: 236,898,635,045.29
Donate

Reputation: 93163
KoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond repute


Awards Showcase
Administrator Of the Month Of Jan 
Total Awards: 1
Function fclose()

The fclose function is used to close files. Simply pass the file handle of the file you want to close, and it will be done. A call to fclose should look something like this:
fclose( FileHandle );
Of course, Filehandle is a file handle to a file opened by fopen. The operating system will close this file, and write any remaining bits, as well as update things like the time it was last accessed. Although it is rare, if you do not close a file with fclose problems may result. The stdio.h header file is required to use fclose.


For Download Links U need to Press Thanks Button
My Goal 2: (Complete 10000)

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2008, 05:13 PM   #6 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,312
Casino Cash: $1074070

Total Points: 236,898,635,045.29
Donate

Reputation: 93163
KoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond repute


Awards Showcase
Administrator Of the Month Of Jan 
Total Awards: 1
Function fopen()

The fopen function is used to open or create files on disk. If successful, it will return a file handle (also called a file pointer) to the program so the file can be accessed by other functions. Here is the format:
handle = fopen( FileName, mode );
The handle must be declared in advanced, just like any other variable. File handles (or pointers) are declared like this:
FILE *FileHandle;
The first parameter to fopen is the file name. This can either be in the form of a string constant (text enclosed in quotes), or a string variable. The second parameter is the access mode for the file. Usually one or two characters enclosed in double quotes represent the mode. Below is a table summarizing the file modes. MODE USED FOR FILE CREATED? EXISTING FILE? "a" Appending Yes Appended to "a+" Reading and appending Yes Appended to "r" Read only No If not found fopen returns NULL "r+" Reading and writing No If not found fopen returns NULL "w" Write only Yes Destroyed "w+" Reading and writing Yes Destroyed fopen file modes

The stdio.h header file is required to use fopen.


For Download Links U need to Press Thanks Button
My Goal 2: (Complete 10000)

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Click here to Donate to remove the Adverts.
Your Ad Here
Old 01-04-2008, 05:14 PM   #7 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,312
Casino Cash: $1074070

Total Points: 236,898,635,045.29
Donate

Reputation: 93163
KoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond repute


Awards Showcase
Administrator Of the Month Of Jan 
Total Awards: 1
Function fprintf()

The fprintf function is used to write to files. It works just like printf except it writes to files not the monitor, and it needs an extra parameter. Here is the format:
fprintf( FileHandle, "format string", variables );
The first parameter must be a file pointer returned form a call to fopen. Other than that it is just like printf. The return value is still the number of characters it wrote. For more information on the formatting stuff see the printf page. The stdio.h header file is required to use fprintf.


For Download Links U need to Press Thanks Button
My Goal 2: (Complete 10000)

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply
Click here to Donate to remove the Adverts.
Your Ad Here
Post New Thread Reply


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
Forum Jump