Ads

Thursday, May 2, 2013

Alternatives to Visual Studio(to compile a c program).


Visual Studio is Windows program to develop software projects in Windows platform.But there are a lot of otherpreferable methods to compile and run C programs.Here I discuss them.


  • gcc (linux os).
Compiling a simple C program


The classic example program for the C language is Hello World. Here is the source code for our version of the program:

#include <stdio.h>
int
main (void)
{
printf ("Hello, world!\n");
return 0;


We will assume that the source code is stored in a file called ‘hello.c’. To compile the file ‘hello.c’ with gcc, use the following command:


$ gcc -Wall hello.c -o hello


This compiles the source code in ‘hello.c’ to machine code and stores it in an executable file ‘hello’. The output file for the machine code is specified using the -o option. This option is usually given as the last argument on the command line. If it is omitted, the output is written to a default file called ‘a.out’.
Note that if a file with the same name as the executable file already exists in the current directory it will be overwritten.
The option -Wall turns on all the most commonly-used compiler warnings---it is recommended that you always use this option! There are many other warning options which will be discussed in later chapters, but -Wall is the most important. GCC will not produce any warnings unless they are enabled. Compiler warnings are an essential aid in detecting problems when programming in C and C++.
In this case, the compiler does not produce any warnings with the -Wall option, since the program is completely valid. Source code which does not produce any warnings is said to compile cleanly.
To run the program, type the path name of the executable like this:


$ ./hello

This loads the executable file into memory and causes the CPU to begin executing the instructions contained within it. The path ./ refers to the current directory, so ./hello loads and runs the executable file ‘hello’ located in the current directory.

Hello, world!

  • cygwin (linux command line in windows )
Try it here - cygwin.

configuring cygwin.......

After downloading and running follow the setup screens until you get to the Cygwin Setup – Select Packages window,Note that the gcc-core: C Compiler component is not selected by default. To select this component,
click the plus sign (+) next to the Devel category and scroll down until you find the gcc-core:
C Compiler component. Click the word “skip” to select the component for installation.Now you can continue installation.

  • Linux OS
Linux OS have gcc by default which is a c source code compiler.

Sunday, April 28, 2013

Alternatives to Internet Explorer

Following the legal agreement between Microsoft and the European Competition Commission in December 2009, millions of Internet Explorer users in Europe now have the option of choosing an alternative browser. However, there are many Internet users out there who do not know what other Web browsers are available in the market due to Microsoft Internet Explorer’s dominance over the years. In no particular order, the following list should give such users a general overview of the top Internet Explorer alternatives on the Web.





Saturday, April 27, 2013

Alternatives to Paypal



There are a few things people are concerned about online shopping, be it their credit card information being at risk, the security of their mobile transaction, or not being able to get a refund if the item they purchased is unsatisfactory.

Others may not be able to use their local credit card on a website. This is why there are online international payment services like PayPal which makes it easy to send, receive and even request for money across borders.

PayPal is internationally known and used by many online shops, telecommunication companies and a ton of other online services. When it comes to convenience and worldwide recognition, it’s the number one choice.

Because it’s so popular, there are a lot of rules and regulations that might hinder a few people from successfully completing a transaction. If you find that PayPal isn’t really a good pal to you, this post will give you a few alternatives

Related Posts Plugin for WordPress, Blogger...

Ads