15,551 Topics

Member Avatar for
Member Avatar for comwizz
Member Avatar for Dave Sinkula
0
147
Member Avatar for vicky_dev

A very versatile, fully customizable graph drawing program using the TurboC++ graphics library. The DrawGraph() functions does the actual graph drawing. It can be used to draw graphs of BOTH CARTESIAN AS WELL AS POLAR functions. You'll need to pass the math. function to the program. The main() demonstrates the …

0
977
Member Avatar for vicky_dev

Program to demonstrate pattern-searching of strings. This program interactively builds a list of words and searches for words in the list that match a specified pattern. The pattern can include wildcard chars * and ?. Eg : The query s* gives the words in the list which start with s. …

0
128
Member Avatar for Ene Uran

Powers of 2 are closly linked to the position values of binary numbers. The most right position is 2 to the power 0 = 1 then goes to the left with 2 to the power 1 = 2, 2 to the power 2 = 4 and such. If you want …

1
147
Member Avatar for Dave Sinkula

How might I write an implementation in C of the standard library function [inlinecode]strcat[/inlinecode]? Here's how I might.

0
284
Member Avatar for vegaseat

This code shows you how to build a multiline story string that should display similarly to way it shows in the code. It should be relatively easy to maintain.

Member Avatar for bumsfeld
2
112
Member Avatar for aj.wh.ca
Member Avatar for sweetleaf
0
147
Member Avatar for bumsfeld
Member Avatar for lazylibran82

This code enables one to find the height of a binary tree using a queue and a marker.

0
168
Member Avatar for Dave Sinkula

If the user tries to put 80 characters in a 20-character buffer, you may have issues. This snippet shows one way to cap the input and discard excess input. [i]See also [url=http://www.daniweb.com/code/snippet280.html]Safe Version of gets()[/url] and [url=http://www.daniweb.com/code/snippet278.html]Read a Line of Text from the User[/url].[/i]

0
293
Member Avatar for Dave Sinkula

This snippet shows one way to calculate the number of days since a given date until present time. Note that this code will not work for dates outside of the current epoch, which typically begins on January 1, 1970.

0
757
Member Avatar for bumsfeld

This program use a while loop to delete trailing spaces and tabs from a string. It is meant to be more of an example of the application of the while loop.

0
1K
Member Avatar for bumsfeld

Commonly strings consist of ASCII characters, some are printable, some are in the backgrounds like the bell, carriage return, linefeed, tab and so forth. This code displays a table of ASCII characters and the corresponding decimal value. As always, you are encouraged to learn here.

Member Avatar for bofarull
1
158
Member Avatar for Dave Sinkula

Some issues, such as leading whitespace and trailing characters that cannot be part of a number, were not handled in [url=http://www.daniweb.com/code/snippet357.html]Read a Floating-Point Value from the User, Part 1[/url]. Here such issues receive lip service. [I]See also [url=http://www.daniweb.com/code/snippet597.html]Read a Floating-Point Value from the User, Part 3[/url][/I].

0
432
Member Avatar for Dave Sinkula

Obtaining user input can be done in many surprisingly different ways. This code is somewhere in the middle: safer than [inlinecode]scanf("%lf", &n)[/inlinecode], but not bulletproof. It is meant to be a simple but relatively safe demonstration. Note also that there would be slight differences for using [inlinecode]float[/inlinecode] instead of [inlinecode]double[/inlinecode]. …

0
207
Member Avatar for Dave Sinkula

This snippet asks the user to fill in a structure and saves each record to the file. It uses append mode to add each new record to the end of the file. After all input is taken, it prints out the contents of the file. [i]Disclaimer: [font=courier new]fread[/font] and [font=courier …

1
489
Member Avatar for Dave Sinkula

Some issues, such as leading whitespace and trailing characters that cannot be part of a number, were not handled in [url=http://www.daniweb.com/code/showsnippet.php?codeid=266]Read an Integer from the User, Part 1[/url]. Here such issues receive lip service.

Member Avatar for drxs33
1
468
Member Avatar for bumsfeld

My first experience with pointers. Learned how to spell a string foreward and backward using pointers. I hope you can learn too!

1
118
Member Avatar for Dave Sinkula

This snippet shows one way to count the number of lines in a file. It will count the last line of a file even if the last line does not end in a newline. Usage: [code]C:\>linecnt linecnt.c lines = 32[/code]

0
169
Member Avatar for gavindu123

This program was created by Gavindu Nuwan Dileepa and using this program you can add data to the stack , delete data and also you can view data from it... for more information contact [email]gavindu123@gmail.com[/email].. thanks

Member Avatar for Shark7
0
184
Member Avatar for Dave Sinkula

How might I write an implementation in C of the standard library function [inlinecode]strcmp[/inlinecode]? Here's how I might. [i]See also [url=http://69.93.117.133/code/snippet440.html] Strings: Comparing, Case-Insensitive[/url].[/i]

0
1K
Member Avatar for Dave Sinkula

How might I write an implementation in C of the standard library function [inlinecode]strcpy[/inlinecode]? Here's how I might.

0
185
Member Avatar for Dave Sinkula

How might I write an implementation in C of the standard library function [inlinecode]strstr[/inlinecode]? Here's how I might. [url=http://www.daniweb.com/code/snippet313.html]What if I need it to be case-[b]in[/b]sensitive[/url]?

0
159
Member Avatar for Dave Sinkula

How might I write an implementation in C a case-insensitive version of the standard library function [inlinecode]strstr[/inlinecode]? Here's how I might. [url=http://www.daniweb.com/code/showsnippet.php?codeid=314]But I need it to be case-sensitive[/url]?

Member Avatar for c_coder
0
2K
Member Avatar for Dave Sinkula

How might I write an implementation in C of the standard library function [inlinecode]strstr[/inlinecode]? Here's how I might.

0
129
Member Avatar for kerribyrd

This is a program I created a couple of weeks ago for class using DevC++ compiler. THis program allows the user 20 tries to guess a number between 1 and 100. It keeps track of wins and losses and offfers the option to continue or quit, displaying game stats.

0
104
Member Avatar for anurag_pareek

This Program gives the details (name, kernel, machine type, domain, groups, sizeof data types, etc) of the host it is running on.

Member Avatar for maxthrill
0
104
Member Avatar for anurag_pareek

This Program gives the UserDetails of the logged in User. a) The RealName b) Login Name ( Why do we need this?) c) Home Directory d) Default Login Shell Additional Purpose of this code would be to invoke/ learn at man getpwuid and about struct passswd

Member Avatar for bumsfeld
0
998
Member Avatar for harshchandra

It's a simple program .Just enter any date in dd/mm/yyyy format.If you enter wrong you will get the message .

0
187

The End.