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:22 PM   #22 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,583
Casino Cash: $1107970

Total Points: 237,141,951,932.90
Donate

Reputation: 96111
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 strcpy()

The strcpy function (string copy) copies one string into another. Remember, in C arrays cannot be set equal to each other with the assignment operator (=). So this is how you do it.
strcpy( destination, source );
//or
strcpy( destination, "source");
Destination and source and are both strings. The strcpy function will copy the contents of source, and put them into destination. As you can see, the source part can also be a string constant. When strcpy is done, destination and source are identical. They both have the same characters in them. Destination should be of equal or greater length than the source. For strcpy to work you must include the string.h header file.


For Download Links U need to Press Thanks Button

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is offline  
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:22 PM   #23 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,583
Casino Cash: $1107970

Total Points: 237,141,951,932.90
Donate

Reputation: 96111
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 strcspn()

The strcspn function searches one string for the characters found in another. It takes two strings as parameters, and returns and integer. Here is the format.
index = strcspn( to_search, search_for );
To_search and search_for are both strings, but one or both can be string constants. Index is the element in to_search where the string search_for starts. If search_for can not be found in to_search, then index will equal the length of to_search. The characters in search_for must appear together and in order, in to_search if a match is to be found. Here is sample call with string constants.
index = strcspn( "Hay, That's not your platypus!", "that's");
Here, index would equal 5. Did you count 6? Remember the computer likes to start counting at zero.
0 1 2 3 4 5 6 7 8
H a y , T h a t. . .
For strcspn to work you must include the string.h header file.


For Download Links U need to Press Thanks Button

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

Total Points: 237,141,951,932.90
Donate

Reputation: 96111
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 strlen()

The strlen function (string length) Examines a string and tells you how long it is (how many characters it has). It takes one parameter, which is a string and returns an integer (the length). here is the format.
length = strlen( string );
The strlen function will count how many characters are in string. That number will be saved in length. Note, strlen does NOT count the null byte. For strlen to work you must include the string.h header file.


For Download Links U need to Press Thanks Button

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is offline  
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:23 PM   #25 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,583
Casino Cash: $1107970

Total Points: 237,141,951,932.90
Donate

Reputation: 96111
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 strncpy()

The strncpy function (string n copy) copies a portion of one string into another string. The n in strncpy implies that the first n characters of the source string will be copied into a destination string. Here is the format.
strncpy( destination, source, length );
Destination and source are both string variables. Length is an integer, and says how much of source will be copied into destination. So, if length is three, then the first three characters in source will be copied into destination. If length is longer than source, then destination will be appended with null bytes. If the length is longer than destination, then as many characters as can fit will be put in destination, but there will NOT be a null byte at the end. You will have to put one there yourself. You can do that by setting the last element of the array equal to '\0' (the null byte). Here is an example.
string[SIZE-1] = '\0';
SIZE is the total size of the array. The "-1" is there because arrays start at 0, so their range is from 0 to SIZE-1; For strncpy to work you must include the string.h header file.


For Download Links U need to Press Thanks Button

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

Total Points: 237,141,951,932.90
Donate

Reputation: 96111
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 strupr()

The strupr function (string upper) Takes a string and changes all the elements to uppercase (if they are not already). It takes one parameter, a string of course. Here is the format.
strupr( string );
When strupr is done, all the elements in string (that are letters) will be uppercase. For strcat to work you must include the string.h header file.


For Download Links U need to Press Thanks Button

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is offline  
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:24 PM   #27 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,583
Casino Cash: $1107970

Total Points: 237,141,951,932.90
Donate

Reputation: 96111
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 toupper()

The function toupper takes one parameter, a character, and returns the uppercase equivalent. It works like this:
upper = toupper( lower );
Upper and lower are both character variables here. The toupper function will take lower, find it's uppercase version, and return it. The parameter is NOT changed! Lower will still be lower case, but upper will have the uppercase version of lower. However you could do this:
lower = toupper( lower );
Now lower will be changed. This function requires the ctype.h or stdlib.h header file (depending on you OS and/or compiler). That's it.
TECHNICAL NOTES

*You really don't need the toupper function. All you do is subtract 32 from the lower case letter, and the result will be the corresponding uppercase letter
*This happens because all characters have secret code numbers for the computer (because the computer only knows numbers) and in this code lower case letters happen to be 32 places above their corresponding uppercase letter.
*That is basically what toupper does.
*The secret code isn't really secret. It's called ASCII code


For Download Links U need to Press Thanks Button

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply
The Following User Says Thank You to KoOL For This Useful Post:
barnick (06-28-2008)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
linux functions? Roslan A Linux and UNIX 1 05-05-2008 08:32 AM
Mean Oscillations and Equimeasurable Rearrangements of Functions KoOL Ebooks,tutorials & Other Stuff 0 12-09-2007 02:27 PM
vbPlaza Main Functions KnooBill Comments, Suggestion, Support 7 11-29-2007 05:20 PM
best phone on look- functions- life etc: SE z610,... abi.....x Media Players 0 07-23-2007 04:45 AM



Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles

RapidShare Links PhazeDDL Warez
PhazeDDL Warez