15,551 Topics
| |
THE program highlights how to create a 2d array in freestore using pointers.. this is my first post so if i commit any fallacies regarding protocol or syntax please forgive me .... | |
choose a random element from a sequence when a. you do not know how many elements are there before hand b. you want to make one single pass through the sequence c. you do not want to use auxiliary storage | |
hi every body try out this code it can store your info and then retriaeve it ant any time you wish. They are two codes each wrote separatly so first write the outputting code and run it. Then write the inputting code and also run it have fun:lol: | |
Here is just a simple program to sort two strings inputted from the user entered on the command line. | |
For all functions, a domain error occurs if an input argument is outside the domain over which the mathematical function is defined. On a domain error, the function returns an implementation-defined value. | |
This snippet uses [INLINECODE]strtod[/INLINECODE] to be a little more stringent. | |
The program uses doubly linked lists to store the numbers where each node contains a single digit . Hence numbers of any length can be used as operands . Program works only with +ve integers | |
the code now contains snippet to create the linked list too! any questions can be directed to [U]raghu_tillu@hotmail.com[/U] | |
Hello to everyone out there. Recently many people on different forums have been asking how to make a recursive function which reverses the string passed to it. But unlike the normal recrusive funtion which only prints out the reversed string, this implementation returns a pointer to reversed string. | |
The program parses the digits in the number supplied to it and converts it to aplhabetical equivalent. Fore eg. input: 1234 output: one two three four This is a simple exercise for newbies, must try out. Tested and works under ideal input conditions. | |
Just a short little C program to send beeps to the PC internal speaker. Beep(frequency_hrz, duration_ms) is a WinAPI function as is Sleep(ms). | |
This algorithm proved to be effective when two images are combined. The picture beneath (background) is seen if alpha component of fronth picture is less then 0xFF. If alpha of front picture (src in snippet) is zero then all we see is background picture. The format of colour is ARGB … | |
A simple program to calculate combinations of a string using recursion, I have used a malloc string of size 100 , you can change it to whatever value you want. The author is currently working at Microsoft. for eg if input string is abcd and you want all 3 letter … | |
This snippet is an example of using XOR encryption to encrypt/decrypt a file. It uses command-line input parameters as follows:[indent]argv[1] - name of input file to encrypt/decrypt argv[2] - name of output file argv[3] - crypt key[/indent]For example, an input file called "main.c" is used to create an output file … | |
In [url=http://www.daniweb.com/code/snippet259.html]Part 1[/url], the code reversed the string in place. This version uses a source and a destination string. | |
/*This program works just like MS-DOS. It takes in the input, uses the C Library, uses the system files and function, executing and displaying the code on the same command prompt. */ | |
This snippet shows how to use command line arguments as variables in your program. A command line argument is extra information you give a program at runtime, by typing the information after the program name like so: Linux might look like this: user$: ./myprogram argument1 argument2 A windows command prompt … | |
Used recursion to reverse the string. Another method for string reversal. | |
Returns the duplicate value in array t[n], which contains numbers 1 to n-1. Given two approaches with O(n) and O(n-square) complexities. | |
Return Nth the node from the end of the linked list. Time Complexity is O(n). | |
One line stament which acts as a conditional operator ?: If x=true, returns y else returns z. | |
[B][COLOR="Red"]Introduction[/COLOR][/B] There are many times when we try to create a binary search tree of many different data types. This article explains creation of a template library CTree. template <class T>class CTree can be used to create a binary search tree (BST) of any data type. [B][COLOR="red"]Features[/COLOR][/B] This class support … | |
Beginner C++ - A simple calculator writen in C++, compiled on Tubo C++ v4.5 & Borland C++ 5.5. The user inputs numbers & chooses '+','-','*'/' The operator is tested. If correct the appropriate sum is preformed. | |
This program calculates the determinant of a square matrix of any order using a recursive function. Uses a square matrix struct and related functions. | |
count the number of occurrences of a sub-string in another string. a good example for learning how to make your own functions like strcpy, strlen and strcmp | |
Yet another angle at this same topic. [i]See also [url=http://www.daniweb.com/code/snippet318.html]Parsing a String into Tokens Using strcspn, Part 1[/url] and [url=http://www.daniweb.com/code/snippet443.html]Parsing a String into Tokens Using strcspn, Part 2[/url].[/i] | |
This snippet is a variation of the code in [url=http://69.93.117.133/code/snippet318.html][i] Parsing a String into Tokens Using strcspn, Part 1[/i][/url]. It uses canned strings rather than reading from a file. [i]See also [url=http://www.daniweb.com/code/snippet444.html]Parsing a String into Tokens Using strcspn, Part 3[/url].[/i] | |
Regular expression pattern match in a string, I only checked with * as wild card, other wild card characters are easy implement but I havent done that. any problems you can email me @ [email]rramaswa@usc.edu[/email] platform - Unix/Linux, havent tested in windows, should'nt be a problem unless some standard header … | |
How might I write an implementation in C of a case-insensitive version of the standard library function [inlinecode]strcmp[/inlinecode]? Here's how I might. This this is often available as a nonstandard function that may be called [inlinecode]stricmp[/inlinecode], [inlinecode]_stricmp[/inlinecode], [inlinecode]strcmpi[/inlinecode], or [inlinecode]strcasecmp[/inlinecode]. [i]See also [url=http://69.93.117.133/code/misc.php?action=edit&codeid=316]Strings: Comparing[/url].[/i] | |
This program outputs a given string word-wrapped to N columns in console. The program can also handle words whose length is greater than N. |
The End.