Posts

How to Compile and Run a C Program on Ubuntu Linux

                    For ease of future access to the terminal application, right click its icon in the Launcher and select “Lock to Launche Step 2. Use a text editor to create the C source code. Type the command  gedit hello.c  and enter the C source code below #include<studio.h> { printf("Hello World\n") ;  } Close the editor window. Step 3. Compile the program. Type the command gcc -o hello hello.c This command will invoke the GNU C compiler to compile the file hello.c and output (-o) the result to an executable called hello.  Step 4. Execute the program.  Type the command   ./hello  should result in the output  Hello World Step 3. Compile the program Type the command          gcc -o hello hello.c This command will invoke the GNU C compiler to compile the file hello.c and output (-o) the result to an executable ...
                                                        The C Compiler C program is a set of instructions written in high-level language(English) and the computer won’t understand the High-level Language The compiler compiles the source codes into final executable programs. The most frequently used and free available compiler is the GNU C/C++ compiler, otherwise you can have compilers either from HP or Solaris if you have the respective operating systems. A  compiler  is a computer program  (or a set of programs) that transforms source code  written in a  programming language The section explains how to install GNU C/C++ compiler on various OS. We keep mentioning C/C++ together because GNU compiler works for both C and C++ programming languages......                  ...

C ENVIRONMENT SETUP

                     C ENVIRONMENT  SETUP   In order to start compiling and executing c programs, you need the following two software tools available on your computer, (a) Text Editor and (b) The C Compiler. C is often called a "Middle Level" programming language. because of its capability to access the system's low level functions. Most high-level languages (e.g. Fort-ran) provides everything the programmer might want to do already built into the language. A low level language (e.g. assembler) provides nothing other than access to the machines basic instruction set a) Text Editor : This will be used to type your program. Examples of few a editors include Windows Notepad, OS Edit command, Brief, Epsilon, EMACS, and vim or vi. The name and version of text editors can vary on different operating systems. For example, Notepad will be used on Windows, and vim or vi can be used on windows as well as on Linux...

C PROGRAMS

                                                             C  PROGRAMS This C programming basics section explains a simple “Hello World” C program. Also, it covers below basic topics as well, which are to be known by any C programmer before writing a C program.  You can use  "vi" ,  "vim"  or any other text editor to write your C program into a file. This tutorial assumes that you know how to edit a text file and how to write source code inside a program  * B elow are few commands and syntax used in C programming to write a simple C program. Let’s see all the sections of a simple C program line by line.          C Basic commands Explanation #include <stdio.h> This is a preprocessor command that includes standard input output header file(st...

WHY USE C LANGUAGE

                                                             WHY USE C . C  is a very powerful and widely  used language . It is  used  in many scientific programming situations. It forms (or is the basis for) the core of the modern  languages  Java and  C ++. It allows you access to the bare bones of your computer.     .    C was adopted as a system development language because it produces code that runs nearly as fast as the code written in assembly language.                                   Some examples of the use of C might be  :-  .  Operating Systems .  Language Compilers .  Assemblers .  Text Editors .  Print Spoolers...

C LANGUAGE

                                 MOST IMPORTANT  THINGS ABOUT C LANGUAGE                                     I am here to share some  Interesting Facts In C Programming  which I came across                 reading till now. Some of these facts you may know already .   .  Today C is the most widely used and popular System Programming Language. C is a successor of B language which was introduced around the early 1970s . It was developed & released around the year 1972. C was invented to write an operating system called UNIX.It’s really easy and fun to write a C program. You can check ou t.   How to write a C program in Linux . Today's most popular Linux OS and RDBMS MySQL have been written in C.  One of the most...

C Language

                                                              C LANGUAGE                  The C programming language is a structure oriented programming language, developed at Bell Laboratories in 1972 by Dennis Ritchie      M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC PDP-11 computer in 1972 In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C, now known as the K&R standard   C has now become a widely used professional language for various reasons − * Easy to learn * Structured language * It produces efficient programs * It can handle low-level activitie s                  ...