<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4389443862338186018</id><updated>2025-12-14T05:20:10.895+02:00</updated><category term="C"/><category term="ANSI"/><category term="Java"/><category term="Algorithms"/><category term=".NET"/><category term="Mathematics"/><category term="String operations"/><category term="File Operations"/><category term="Arrays"/><category term="VB"/><category term="Data Structures"/><category term="Visual Programming"/><category term="Image Processing"/><category term="Linux"/><category term="NMat"/><category term="Visual Studio"/><category term="Operators"/><category term="AWT"/><category term="Applets"/><category term="Bitwise"/><category term="Concurrent Programming"/><category term="Console"/><category term="Text Files"/><category term="C#"/><category term="Cryptography"/><category term="Databases"/><category term="Event Programming"/><category term="Memory Management"/><category term="Microsoft SQL Server CE"/><category term="Threads"/><category term="gcc"/><category term="C++"/><category term="Compilers"/><category term="Control Flow"/><category term="Eclipse"/><category term="External Arguments"/><category term="GDS"/><category term="Game Programming"/><category term="Netbeans"/><category term="Pointers"/><category term="Preprocessor"/><category term="Random Numbers"/><category term="Bash"/><category term="Collections"/><category term="Constants"/><category term="Enumerations"/><category term="Exception Handling"/><category term="File I/O"/><category term="GUI"/><category term="Geometry"/><category term="Gnome"/><category term="Gnome3"/><category term="Graphics"/><category term="Inheritance"/><category term="JavaDoc"/><category term="Legacy"/><category term="Library"/><category term="Locale"/><category term="Memory Operations"/><category term="OOP"/><category term="SQL"/><category term="Serialization"/><category term="Signal Processing"/><category term="Skeleton Code"/><category term="Software Architecture"/><category term="Swing"/><category term="Telecommunications"/><category term="Text User Interface"/><category term="Type Conversions"/><category term="Ubuntu"/><category term="Windows"/><category term="Wrappers"/><title type='text'>Dystopian Code</title><subtitle type='html'>Programming Tutorials</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>117</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-4008182871937341717</id><published>2013-01-13T07:47:00.002+02:00</published><updated>2013-01-13T07:57:41.195+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Console"/><title type='text'>Reading from Console in ANSI C</title><summary type="text">The ANSI C standard I/O library (stdio.h) provides us with 3 powerful functions for reading data from STDIN (the stream used for the console):

-Reading a character: getchar

-Reading formatted input: scanf
-Reading an entire line:&amp;nbsp;gets

Here&#39;s a short example on how you can use any of these functions to read a string:
#include&amp;lt;stdio.h&amp;gt;

int main(void)
{
    const int LENGTH = 100;

</summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/4008182871937341717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2013/01/scanf-getchar-gets-ansi-c-console.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/4008182871937341717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/4008182871937341717'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2013/01/scanf-getchar-gets-ansi-c-console.html' title='Reading from Console in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-6010518577468775980</id><published>2013-01-08T01:32:00.003+02:00</published><updated>2013-01-08T02:12:11.419+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Console"/><category scheme="http://www.blogger.com/atom/ns#" term="gcc"/><title type='text'>How to Print to Console in ANSI C</title><summary type="text">The ANSI C standard I/O library (stdio.h) provides us with 3 powerful functions for&amp;nbsp;outputting characters to STDOUT (the stream used for the console):
-Printing a character: &amp;nbsp;putchar
-Printing a string : puts
-Printing a formatted string : printf

A formatted string is a dynamical string that is built on the go. Here&#39;s an example:
#include&amp;lt;stdio.h&amp;gt;

int main(void)
{
    int myInt </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/6010518577468775980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2013/01/printf-puts-putchar-ansi-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/6010518577468775980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/6010518577468775980'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2013/01/printf-puts-putchar-ansi-c.html' title='How to Print to Console in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-1169893920019824615</id><published>2013-01-04T00:14:00.002+02:00</published><updated>2013-01-05T03:25:48.327+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Memory Operations"/><title type='text'>Using sizeof to Determine the Size of a Data Type in ANSI C</title><summary type="text">The size of an ANSI C data type is dependent on the compiler. &amp;nbsp;However it can be easily determined by using the sizeof operator.


Here&#39;s a &amp;nbsp;example on how to do it:

#include&amp;lt;stdio.h&amp;gt;

typedef struct
{
    int  field1;
    long field2;
    char field3[30];
}ExampleStructure;

typedef union
{
    int field1;
    double field2;
}ExampleUnion;

typedef enum
{
    enum1,
    enum2,
</summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/1169893920019824615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2013/01/using-sizeof-to-determine-size-of-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/1169893920019824615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/1169893920019824615'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2013/01/using-sizeof-to-determine-size-of-data.html' title='Using sizeof to Determine the Size of a Data Type in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-4226763671968835576</id><published>2012-08-19T18:54:00.002+03:00</published><updated>2012-09-12T23:24:24.776+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics"/><title type='text'>Integer Rounding in ANSI C</title><summary type="text">
1.Unsigned Integers

When two unsigned integers are divided, the result will be rounded down.


result = numerator / denominator;
To round up a result you must apply the following idiom:


result = (numerator + denominator - 1) / denominator;
Example:
#include&amp;lt;stdio.h&amp;gt;

int main(void)
{
    unsigned int numerator   = 50;
    unsigned int denominator = 25;
    unsigned int upResult;
    </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/4226763671968835576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/integer-rounding-in-ansi-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/4226763671968835576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/4226763671968835576'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/integer-rounding-in-ansi-c.html' title='Integer Rounding in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-1710739474302875596</id><published>2012-08-19T16:31:00.002+03:00</published><updated>2012-09-13T00:00:15.564+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GUI"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Swing"/><title type='text'>Creating a MessageBox / Message Dialog in Java Swing</title><summary type="text">To create a dialog in Swing, you will need to use the JOptionPane&amp;nbsp;class.

If you want to trigger a message dialog, you will need to use the static method:

showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)






1.The Parent Component

Defines the component (usually a JFrame or a JPanel) that will be the parent of the dialog. The </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/1710739474302875596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/creating-messagebox-message-dialog-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/1710739474302875596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/1710739474302875596'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/creating-messagebox-message-dialog-in.html' title='Creating a MessageBox / Message Dialog in Java Swing'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj72-8nsAF9atOwQrpUPlySZNYG1g8T6Pe8FkrhSUqKG_hJkjjBsVpt3Z6HjqUeQbTdmvqBHclaA-u6BaW-beErIy-ZUCHZCtsBlmLKGACal6zoPq7BUHjdMxVvuJM5RhI3IAquQImA1Q/s72-c/Screenshot+from+2012-08-19+13:43:13.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-62269728418042439</id><published>2012-08-19T12:39:00.001+03:00</published><updated>2012-09-12T23:38:33.553+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaDoc"/><category scheme="http://www.blogger.com/atom/ns#" term="Netbeans"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Installing and Configuring JavaDoc for Netbeans in Ubuntu</title><summary type="text">
If you encounter such an error, you probably don&#39;t have JavaDoc installed or you don&#39;t have it configured correctly.


The JavaDoc error


1.Installing JavaDoc

You can install it using command-line or a package manager.

To install it command-line open a terminal and type:
sudo apt-get install openjdk-6-doc

If you want to install it using Ubuntu Software Center, open it and search for </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/62269728418042439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/installing-and-configuring-javadoc-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/62269728418042439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/62269728418042439'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/installing-and-configuring-javadoc-for.html' title='Installing and Configuring JavaDoc for Netbeans in Ubuntu'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi473I15gfgisws6vkMZHAcqm3QCJ4ORpsUKUE2ggHj4_231lMW9yHhaHo-PdqPbOQmdS9WXuMTeaOod7KeksMxl-XqXQmTe7ajbgcAl4eb7vC3OKgfEa6FUvWv7kKQZdUJKdLilrpovQ/s72-c/Screenshot+from+2012-08-19+12:06:22.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-2078392017524276163</id><published>2012-08-18T12:28:00.003+03:00</published><updated>2012-08-18T12:30:30.870+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Gnome"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Removing Shortcuts From the Gnome Applications Menu Manually</title><summary type="text">If you installed a program without using the Ubuntu Software Center and there is no uninstaller (or you just deleted the folder), the shortcut to your removed application may still remain in the Application Menu.



If you try to remove it using Alacarte, you may be surprised to see that your shortcut doesn&#39;t appear there. If you find it in Alacarte, read this.



This happened to me when I&amp;nbsp;</summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/2078392017524276163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/removing-shortcuts-from-gnome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/2078392017524276163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/2078392017524276163'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/removing-shortcuts-from-gnome.html' title='Removing Shortcuts From the Gnome Applications Menu Manually'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-1951617141146651926</id><published>2012-08-17T19:59:00.002+03:00</published><updated>2012-09-12T23:58:43.285+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><title type='text'>Euclid&#39;s GCD Algorithm in ANSI C</title><summary type="text">In mathematics, Euclid&#39;s algorithm is a simple yet&amp;nbsp;efficient&amp;nbsp;method for computing the greatest common divisor of two positive integers.

There are 3 possible implementation for Euclid&#39;s algorithm:

1. Division-Based Euclid
/*
 * Description:
 *  Returns the greatest common denominator of a and b using the
 *  Euclid&#39;s algorithm division-based.
 * Parameters:
 *  a,b - two positive </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/1951617141146651926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/euclids-gcd-algorithm-in-ansi-c.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/1951617141146651926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/1951617141146651926'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/euclids-gcd-algorithm-in-ansi-c.html' title='Euclid&#39;s GCD Algorithm in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-6839438514391812431</id><published>2012-08-17T13:32:00.001+03:00</published><updated>2012-09-12T23:59:48.762+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="Bitwise"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><title type='text'>Generic Bitcount Algorithm in ANSI C</title><summary type="text">The purpose of the Bitcount algorithm is to return the number of bits set to 1 in a memory block.

A simple implementation of the Bitcount algorithm would be:

/*
 * Description:
 *  The function returns the number of bits set the 1 in a integer
 * Parameters:
 *  data - the integer who will be verified
 * Returns:
 *  The number of bits set to 1
 */
int SimpleBitCount(unsigned long data)
{
    /</summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/6839438514391812431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/generic-bitcount-algorithm-in-ansi-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/6839438514391812431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/6839438514391812431'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/generic-bitcount-algorithm-in-ansi-c.html' title='Generic Bitcount Algorithm in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-8594005144508916943</id><published>2012-08-17T10:09:00.002+03:00</published><updated>2013-01-13T08:18:09.123+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Enumerations"/><title type='text'>Using Enumerations in ANSI C</title><summary type="text">In ANSI C, a enumeration is a collection of integer constants which share something in common. &amp;nbsp;The enumeration is somewhat of an analogy to a set. Also, enumerations are a better alternative than a group of macrodefinitions.

They can be declared as:
#include&amp;lt;stdio.h&amp;gt;

enum Color
{
   RED ,
   GREEN ,
   BLUE ,
};

int main(void)
{
   printf(&quot;RED = %d\nGREEN = %d\nBLUE = %d&quot;,RED,GREEN</summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/8594005144508916943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/enumerations-in-ansi-c_17.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/8594005144508916943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/8594005144508916943'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/enumerations-in-ansi-c_17.html' title='Using Enumerations in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-5953637811583093948</id><published>2012-08-15T10:20:00.002+03:00</published><updated>2012-09-13T19:29:41.730+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Pointers"/><title type='text'>Basic Pointer Operations in ANSI C</title><summary type="text">Pointers are variables that hold a memory address. Usually that memory address is the first memory address of another variable or a dynamically allocated block.&amp;nbsp;The type of the pointer indicates to what kind of variable it points to.

Example:

    /*A pointer to a int variable*/
    int   *myPointer;
    /*A pointer to a char variable*/
    char  *myCharPointer;
    /*A pointer to a double </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/5953637811583093948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/basic-pointer-operations-in-ansi-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/5953637811583093948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/5953637811583093948'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/basic-pointer-operations-in-ansi-c.html' title='Basic Pointer Operations in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-1536632924616757449</id><published>2012-08-15T09:05:00.001+03:00</published><updated>2012-09-13T19:29:11.522+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Pointers"/><title type='text'>Call by Value and Call by Reference in ANSI C.</title><summary type="text">
In ANSI C, variables can be&amp;nbsp;referred&amp;nbsp;directly or indirectly depending on the context.


A variable who is&amp;nbsp;referred&amp;nbsp;indirectly is a variable who is called-by-value. This means that when you pass the variable to a function, a hard copy of the variable will be created and used in that function. Any modifications that occur to the variable while in the function will not happen to</summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/1536632924616757449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/call-by-value-and-call-by-reference-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/1536632924616757449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/1536632924616757449'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/call-by-value-and-call-by-reference-in.html' title='Call by Value and Call by Reference in ANSI C.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-3850370574634103428</id><published>2012-08-11T19:04:00.002+03:00</published><updated>2012-09-13T19:28:53.162+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="Arrays"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Memory Management"/><title type='text'>Creating a Dynamic Matrix in ANSI C</title><summary type="text">
The memory of a dynamic matrix can be allocated at run time as opposite to the static matrices (who are allocated at compile-time).


The allocation algorithm is based on the function void* malloc(size_t size). The first thing that must be done is to allocate the space for the entire matrix. After that, each row from the matrix must be allocated separately.

/*
 * Description:
 *  Allocates </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/3850370574634103428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/creating-dynamic-matrix-in-ansi-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/3850370574634103428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/3850370574634103428'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/creating-dynamic-matrix-in-ansi-c.html' title='Creating a Dynamic Matrix in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-7386489491155029165</id><published>2012-08-11T12:38:00.001+03:00</published><updated>2012-09-13T19:28:29.663+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Preprocessor"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Architecture"/><title type='text'>Conditional Inclusion in ANSI C</title><summary type="text">Let us assume that you have a program that will run on multiple platforms. For each platform you have an API which defines the functions that you will call in your program.

Example Scenario:
Your platforms are Windows, Unix, BSD and Mac. The headers for the platform specific operations are:
-Windows: windows_api.h
-Unix: unix_api.h
-BSD: bsd_api.h
-Mac: mac_api.h

Here&#39;s an example on how to </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/7386489491155029165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/conditional-inclusion-in-ansi-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/7386489491155029165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/7386489491155029165'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/conditional-inclusion-in-ansi-c.html' title='Conditional Inclusion in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-5687957272397268387</id><published>2012-08-11T11:23:00.001+03:00</published><updated>2012-09-13T19:28:14.922+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Preprocessor"/><title type='text'>Avoiding Multiple Header Inclusion in ANSI C</title><summary type="text">Let us assume that you have 2 header files a.h and b.h&amp;nbsp;and one source file main.c.



The files are in following relation:




Double-inclusion scenario


Let assume that this is the initial content of the files:

The content of b.h:

/*b.h*/
typedef enum
{
    val1 = 1,
    val2,
    val3
}EValues;


The content of a.h:

/*a.h*/
#include&quot;b.h&quot;

const int resource2 = val1+val2;


The content </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/5687957272397268387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/avoiding-multiple-header-inclusion-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/5687957272397268387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/5687957272397268387'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/avoiding-multiple-header-inclusion-in.html' title='Avoiding Multiple Header Inclusion in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirKfSNQ3ynI5ttEjhY7eiurlFjk2rbd4-m1qSIg-jWDzV0zDurqXjEdNTEMZinAA6fGbtwKQUrtH0f2E8Vvv7qJadoPJdjE3H2Ye5eRhJDKX1M9R28ueMRlgqmUHEa4CPrV3wO5Zyy6A/s72-c/Diagram1.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-4942128892300276091</id><published>2012-08-11T09:51:00.001+03:00</published><updated>2013-01-13T08:15:48.688+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><title type='text'>The Literal Suffixes and Prefixes of ANSI C</title><summary type="text">In order to improve the readability of your code , you can declare constant literal values using suffixes.

Also, if you want to initialize integers in other radix than decimal, you can use&amp;nbsp;prefixes. Characters can be as well declared using the octal, decimal and hexadecimal.

Here are some examples:
/*-----------------------------------------------
Integer constants
------------------------</summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/4942128892300276091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/constant-suffixes-and-prefixes-in-ansi-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/4942128892300276091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/4942128892300276091'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/constant-suffixes-and-prefixes-in-ansi-c.html' title='The Literal Suffixes and Prefixes of ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-1876328338293758722</id><published>2012-08-06T22:36:00.003+03:00</published><updated>2012-09-13T19:27:29.687+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="String operations"/><title type='text'>Reversing a String in ANSI C</title><summary type="text">If you&#39;re not familiar with how strings are represented in ANSI C, you should read this first:

Concatenating, Copying and Comparing Strings in ANSI C


We shall reverse the string in situ, without using an additional string. The implementation for this function is:


/**
 * Description:
 *  Reverses the received string.
 * Parameters:
 *  string - a pointer to the string who will be reversed
 * </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/1876328338293758722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/reversing-string-in-ansi-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/1876328338293758722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/1876328338293758722'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/reversing-string-in-ansi-c.html' title='Reversing a String in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-8425218443300398197</id><published>2012-08-04T20:13:00.004+03:00</published><updated>2012-09-13T19:27:10.286+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics"/><category scheme="http://www.blogger.com/atom/ns#" term="NMat"/><title type='text'>Other Matrix Operations in NMat</title><summary type="text">In order to understand this article, you should read the following articles first:

The NMat Library

Creating, Destroying and Copying a Matrix

NMat provides several other operations for matrix calculus, such as:
-Finding the minimum/maximum element of a matrix
-Computing the sum/product of all elements of a matrix
-Extracting rows and columns from a matrix into a submatrix
-Computing the </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/8425218443300398197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/other-matrix-operations-in-nmat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/8425218443300398197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/8425218443300398197'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/other-matrix-operations-in-nmat.html' title='Other Matrix Operations in NMat'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-7951291842261201989</id><published>2012-08-04T00:28:00.004+03:00</published><updated>2012-09-13T19:26:51.400+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics"/><category scheme="http://www.blogger.com/atom/ns#" term="NMat"/><title type='text'>The NMat Library</title><summary type="text">NMat is a ANSI C library that provides an API for matrix operations.

The current operations implemented by NMatlib are:

 
 
 

  Operation
  Description
 

  Create
  Creates a NMatrix object
 

  Destroy
  Destroys a NMatrix object
 

  Clone
  Creates a hard copy of an existent NMatrix object
 

  Sum
  Computes the sum of two matrices
 

  Scalar Multiplication
  Multiplies the matrix with a</summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/7951291842261201989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/the-nmat-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/7951291842261201989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/7951291842261201989'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/the-nmat-library.html' title='The NMat Library'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-15409186376913577</id><published>2012-08-02T19:20:00.001+03:00</published><updated>2012-09-13T19:26:30.919+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Data Structures"/><category scheme="http://www.blogger.com/atom/ns#" term="GDS"/><title type='text'>Defining an Object for the GDS Library</title><summary type="text">If you don&#39;t know about the basics of the GDS library, be sure to read this first:

The Generic Data Structure Library

In order to work with the data structures defined in the GDS library, your&amp;nbsp;structure&amp;nbsp;(which we shall call an object from now on) must be defined in a certain way. In this article I will provide you with a simple example on how to define such an object.



The first </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/15409186376913577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/gds-defining-object.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/15409186376913577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/15409186376913577'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/08/gds-defining-object.html' title='Defining an Object for the GDS Library'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-252796048733394896</id><published>2012-07-29T20:45:00.002+03:00</published><updated>2012-09-13T19:25:43.399+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="Data Structures"/><category scheme="http://www.blogger.com/atom/ns#" term="GDS"/><title type='text'>The Generic Data Structures Library</title><summary type="text">The purpose of the GDS (Generic Data Structures) Library is to provide type-independent data structures such as lists, sets, trees or arrays for the C programming language.

A GDS object contains 2 data structures:
-A interface data structure which contains the object&#39;s generic behaviors:
&amp;nbsp; &amp;nbsp; &amp;nbsp; -Copy (Used for creating a hard copy of the object) 
&amp;nbsp; &amp;nbsp; &amp;nbsp; -Destroy (Used</summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/252796048733394896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/07/the-generic-data-structures-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/252796048733394896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/252796048733394896'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/07/the-generic-data-structures-library.html' title='The Generic Data Structures Library'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-6079354505542988344</id><published>2012-07-27T19:30:00.000+03:00</published><updated>2012-09-13T19:24:35.095+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Library"/><title type='text'>Temperature Conversion Library in Java</title><summary type="text">This library allows you to perform conversion between the Celsius, Kelvin, Rankine, Delisile, Newton, Reaumur, Romer and Fahrenheit temperature scales.

Here&#39;s an example on how to use the library:
package temperatureconversion;

public class TestLauncher
{
    public static void main(String[] args)
    {
        Temperature t1 = Temperature.fromCelsius(-273.15);
        Temperature t2 = </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/6079354505542988344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/07/temperature-conversion-library-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/6079354505542988344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/6079354505542988344'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/07/temperature-conversion-library-in-java.html' title='Temperature Conversion Library in Java'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-8983626864920638440</id><published>2012-07-27T15:15:00.003+03:00</published><updated>2012-07-27T15:16:10.735+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Applets"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Netbeans"/><title type='text'>Designing Applets with the Netbeans GUI Designer</title><summary type="text">
If you want to use the Netbeans GUI editor for an Applet you must follow the next steps:


1. In the menu bar go to File -&amp;gt; New Project and then select Java-&amp;gt;Java Application



2.Name your application and select a location for the project



3, Select the package where you want to add your applet and then right click -&amp;gt; New -&amp;gt; Other. After that go to Swing GUI Forms -&amp;gt; JApplet </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/8983626864920638440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/07/designing-applets-with-netbeans-gui.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/8983626864920638440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/8983626864920638440'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/07/designing-applets-with-netbeans-gui.html' title='Designing Applets with the Netbeans GUI Designer'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPD7O9yceJcCa5cOgE2wx1OAxwscLKCGqkrCyKI_ZeDr4JVeUZ8gRC7eah2Evvmg7njRRNJ6JJ9PmwFf-2OQndBtzA9zrDub4KAazZalqLP3rTHPfZTxMo8Ouhbj-C9ubtJBXKgYvuGg/s72-c/FirstStep.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-5894518503084240402</id><published>2012-07-27T12:20:00.003+03:00</published><updated>2012-09-13T19:25:02.469+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="String operations"/><title type='text'>Pangram Checking Algorithm in ANSI C</title><summary type="text">A pangram is a sentence that contains at least once all the letters of the alphabet. A well known pangram in the&amp;nbsp;English&amp;nbsp;language is the sentence &quot;A quick brown fox jumps over the lazy dog&quot;.

To check if a string is a pangram we must implement a flag vector containing entries for each letter of the alphabet. A flag will be set if the&amp;nbsp;corresponding&amp;nbsp;letter is found in the string</summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/5894518503084240402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/07/pangram-checking-algorithm-in-ansi-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/5894518503084240402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/5894518503084240402'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/07/pangram-checking-algorithm-in-ansi-c.html' title='Pangram Checking Algorithm in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4389443862338186018.post-7288250353011453768</id><published>2012-07-27T10:56:00.000+03:00</published><updated>2012-09-13T19:23:58.045+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><category scheme="http://www.blogger.com/atom/ns#" term="ANSI"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="String operations"/><title type='text'>Anagram Checking Algorithm in ANSI C</title><summary type="text">An anagram&amp;nbsp;is&amp;nbsp;a word or phrase formed by reordering the letters of another word or phrase [Free Online Dictionary].



The easiest method to check if a string is an anagram of another string is to build the letter frequency statistics for both strings and compare them. If the statistics vectors are equal, then the strings are anagrams.


An implementation of such function is:
/*
 * </summary><link rel='replies' type='application/atom+xml' href='http://dystopiancode.blogspot.com/feeds/7288250353011453768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dystopiancode.blogspot.com/2012/07/anagram-checking-algorithm-in-ansi-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/7288250353011453768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4389443862338186018/posts/default/7288250353011453768'/><link rel='alternate' type='text/html' href='http://dystopiancode.blogspot.com/2012/07/anagram-checking-algorithm-in-ansi-c.html' title='Anagram Checking Algorithm in ANSI C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>