Archive for the ‘C’ Category
Well, I think everybody knows and heard about the C language,  The C is one of the most popular computer programming languages of all time.  It was developed by Dennis Ritchie (1969-1973) at Bell Telephone Laboratories in order to use in Unix operating system.
C Book:
http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
Read or Download : Â C Book Dennis M. Ritchie
I coded a lot of programs in C, I love it. Â I remember that the first compiler that I used was Turbo C/C++ and then I used Borland C++. both of them are MS dos-based applications.
Turbo C (v 1.01) has 2 floppy disket, If you would like to download it click here
Also, for version  4.5 click here
Borland C/C++:
Eclipse CDT (C/C++ Development Tooling)
The Eclipse CDT is an advanced C and C++ IDE based on the popular Eclipse platform. It features managed builds, various source knowledge tools, such as type hierarchy, call graph, include browser, macro definition browser, code editor with syntax highlighting, source code refactoring, code generation, visual debugging tools, including memory, registers, and disassembly viewers.
Bloodshed Dev-C++
Bloodshed Dev-C++ or DevCPP in short, is a full-featured IDE for C and C++ programming languages. It uses Mingw port of GCC (GNU Compiler Collection) as its compiler. Its features includes support for GCC-based compilers, integrated debugging using gdb, customizable syntax highlighting editor, automatic code completion, Profiling support, and much more.
Code::Blocks
Code::Blocks or Codeblocks is a free C++ IDE which can be used even in the most demanding situations. It is designed from the scratch, to be very extensible and fully configurable.
It features customizable and extensible syntax highlighting, code folding, tabbed interface, code completion, class Browser, multi user support and much more.
Netbeans IDE
You’ll be probably surprised to see Netbeans listed here, as its a popular Java IDE. But it can be used for C and C++ development as well. You can develop professional quality native applications in C, C++ using Netbeans IDE.
Its features include C and C++ unit testing, integrated profiler, packaging support, gdb integration, syntax highlighting and code assistance.
Microsoft Visual Studio Express
Microsoft® Visual Studio® 2010 Express is probably the best C++ IDE. Its free but you have to register your copy within 30 days of installation.
Download Microsoft® Visual Studio® 2010 Express Edition
This C program generate a random number by normal distribution function N(0,1):
Here is source code:
//=====> Â Generate Random Number by Normal Distribution <=====\\
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <conio.h>
#include <time.h>
//===> Generate Random Number between 0 , 1
double GetRandom()
{
int i;
double rn;
time_t t;
srand((unsigned) time(&t));
rn=random(1000)/1000.0;
return rn;
}
double GenerateRandomNormal()
{
double u1,u2,v1,v2;
double s=2.0;
double r;
while (s>=1.0)
{
u1=GetRandom();
u2=GetRandom();
v1=2.0*u1-1;
v2=2.0*u2-1;
s=pow(v1,2)+pow(v2,2);
};
r=double(v1*sqrt((-2.0*log(s))/s));
return r;
}
//===> Generate Random number from Normal Distribution N(0,1)
int main(void)
{
int n,i;
clrscr();
printf("Generate Random Number from Normal Distribution N(0,1)\n\n");
printf("R=%lf",GenerateRandomNormal());
getch();
return 0;
}
Program Out put picture:


