Posts

Showing posts from May, 2018

Compiling and Running Your First C Program

                                            Compiling and Running Your First C Program  in this topic  I ntroduces the basics of C programming in an easy-to-follow format, and includes some exercises you can try on your own to get you started how to save the source code in a file, and how to compile and run it. Open a text editor and add the above-mentioned code. Save the file as  hello.c Open a command prompt and go to the directory where you have saved the file. Type  gcc hello.c  and press enter to compile your code. If there are no errors in your code, the command prompt will take you to the next line and would generate  a.out  executable file. Now, type  a.out  to execute your program. You will see the output  "Hello World"  printed on the screen. $ gcc hello.c $ ./a.out Hello, World! e gcc compiler is in your path and that you are running it in the directory containing the source file hello.c.

Your First Program C - Program Structure

so when we install GCC on Windows, then we  need to install MinGW. so  install MinGW,.  MinGW installation program, which should be named MinGW-<version>.exe. when we installing  Min GW, at  a minimum, so you have to necessary to install  GCC -core, g++  binutils, and the MinGW. Add the bin subdirectory of your MinGW installation to your  PATH environment variable, so that you can specify these tools on the command line by their simple names. After the installation is complete, you will be able to run gcc, g++, after  GNU tools from the windows command line.                                             C- PROGRAM STRUCTURE In this article, you'll learn about structures in C programming; what is it, how to define it and use it in your program. Structure is a collection of variables of different types under a single name. For example:  You want to store some information about a person: his/her name, Membership  number and salary. You can eas

How to do a clean install of mac OS

                                                                  How to do a clean install of macOS D ownloading and installing a new OS gives you the opportunity to do some major home cleaning so if u so disire.....  . If you feel like you'd like a fresh start with  mac OS just follow this link  steps below, even if you've hunt how to i installed mac OS ; developer.apple.com/technologies/tools/ .  these things is the important  whenever u installed mac os  Apple's web site and follow the simple installation instructions. Once you have X code setup, you will be able to use GNU compiler for c++/c.

how to installation on UNIX/LINUX

Step 4. Execute the program.         Type the command ./hello This should result in the output Hello World how to installation on UNIX/LINUX If you are using  Linux or UNIX , then check whether GCC is installed on your system by entering the following command from the command line − $ gcc -v If you have GNU compiler installed on your machine, then it should print a message as follows − Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr ....... Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-46) If GCC is not installed, then you will have to install it yourself using the detailed instructions available at  https://gcc.gnu.org/install/ This tutorial has been written based on Linux and all the given examples have been compiled on the Cent OS flavor of the Linux system.