User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 374,570 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 2,525 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.
Code Snippets By: Dave Sinkula
This snippet uses strtod to be a little more stringent. (View Snippet)
This snippet is an example of using XOR encryption to encrypt/decrypt a file. It uses command-line input parameters as follows:argv - name of input file to encrypt/decrypt argv - name of output file argv - crypt keyFor example, an input file called "main.c" is used to create an output file... (View Snippet)
In Part 1, the code reversed the string in place. This version uses a source and a destination string. (View Snippet)

Hex Dump in c

This is a quick and dirty example of a hex dump utility. Not much in the way of special features -- it just dumps the contents of a hard-coded filename in hex and also shows the characters. An example that can show the basics of making your own. (View Snippet)
Yet another angle at this same topic. See also Parsing a String into Tokens Using strcspn, Part 1 and Parsing a String into Tokens Using strcspn, Part 2. (View Snippet)
This snippet is a variation of the code in Parsing a String into Tokens Using strcspn, Part 1. It uses canned strings rather than reading from a file. See also Parsing a String into Tokens Using strcspn, Part 3. (View Snippet)
This is a strtol version of Read an Integer from the User, Part 2. (View Snippet)
How might I write an implementation in C of a case-insensitive version of the standard library function strcmp? Here's how I might. This this is often available as a nonstandard function that may be called stricmp, _stricmp, strcmpi, or strcasecmp. See also Strings: Comparing. (View Snippet)

Morse Code in c

This code uses a structure to map a letter to an equivalent representation of Morse code. It simply loops through either a string to encode or decode looking for text to substitute with a replacement string or character. Output is presented to the stdout. (View Snippet)
Break down an amount into units of dollars and cents. (View Snippet)
All times are GMT -4. The time now is 5:42 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC