User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 397,092 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,097 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:
Contribute Code
To check for integer overflow, you can't simply check the outcome of an operation, you need to check before the operation. So how do you do that? This example checks for overflow with multiplication. (View Snippet)
This is yet another example of reversing a string. This version modifies the original, reversing the string in place. See also Strings: Reversal, Part 2. (View Snippet)
This problem is a typical homework question. The code presented here may contain some elements that may be a little "ahead of the game" in coursework, but it presents some of the basic elements that might be used in such an exercise. (View Snippet)
This is a bit more tough than it sounds. well some one gave me this problem and I found this tricky not until I used recursion. (View Snippet)
Many of the code samples on the internet are written in Turbo C. The clrscr() function litters these samples, and even to this day people want to wipe your screen. You can use system("CLS"), but that uses a DOS command. DOS commands are with us only at the whim of William the Mighty. Here is... (View Snippet)
This program uses WinApi function SetPixel() to plot math functions y = sin(x) and y = cos(x) and y = sin(x)*cos(x) along a y-axis centered on the console screen. Make sure that gdi32.lib is included in the libraries to be linked. (View Snippet)
A fairly complete implementation to provide another perspective on a seemingly simple program. (View Snippet)
A very rudimentary more, press enter to view next screenful of text, like with print command in ed text editor. (View Snippet)
Similar to cat in unix textutils. You can actually edit files with these. Remember that ctrl-z sends end-of-file in windows, and ctrl-d in linux. (View Snippet)
Text fragment extractor (usage: fragment /pattern/ ] file), similar to the print command in ed and vi, with pattern range. If the second pattern is omitted, prints to the end of file. Use quotation marks when there are spaces in the argument. Finds the first pattern, then the second pattern, then... (View Snippet)
Contribute Code
All times are GMT -4. The time now is 1:43 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC