Showing posts with label C. Show all posts
Showing posts with label C. Show all posts

Friday, May 17, 2019

Compiler & Interpreter

Compiler & Interpreter

Compilers and interpreters are used to convert the code of high level language into machine language. The high level program is known as source program and the corresponding machine level program is known as object program. Although both compilers and interpreters perform the same task but there is a difference in their working


Compiler

          A compiler searches all the errors of a program and lists them. If the program is error free then it converts the code of program into machine code and then the program can be executed by separate commands.

Interpreter

         An interpreter checks the errors of a program statement by statement. After checking one statement, it converts that statement into machine code and then executes that  statement. The process continues until the last statement of program occurs.


Static & Dynamic Linking

C Program’s Life Cycle !!

C Program’s Life Cycle !!



What are C libraries?

Pre-compiled functions that come with the C compiler.
The functions are grouped in different packages called libraries.
To use functions included in a library, include the header file specified for that library in your program.
Exemples:
#include <math.h>
#include <conio.h>
#include <stdio.h>



Why C Programming Language? Features !!

Why C !!:


¨ C is a widely used portable high level programming language
¨ High level, but also let’s your program closer to the metal.
¨ Used for embedded programming
¨ Many language have a c pedigree
¨ it can manipulate bits of computer memory. 
¨ can run on different platforms with very little modification. 

Features of C Language:


There are many features of c language are given below:
1)   Simple
2)   Machine Independent or Portable
3)   Mid-level programming language
4)   structured programming language
5)   Rich Library
6)   Memory Management
7)   Fast Speed
8)   Pointers
9)   Recursion
10) Extensible

Thursday, January 3, 2019

Hello World ( First Programming Language ) !!

Code Source For Hello World Program

Click the buttons in the tabbed list that indicate the language you're looking for:

Hello World Program!!

// helloworld c++
F:\blogspot\Code Source\HelloWorld\main.cpp
 1 #include <iostream>
 2  
 3  using namespace std;
 4  
 5  int main()
 6  {
 7      cout << "Hello world!" << endl;
 8      return 0;
 9  }

Hello World Program!!

// helloworld c
F:\blogspot\Code Source\HelloWorldc\main.c
 1 #include <stdio.h>
 2  #include <stdlib.h>
 3  // main function where the execution of program begins
 4  int main()
 5  {
 6      // we use printf to print the text between "" in the screen
 7      // we use \n to return to the next line
 8      printf("Hello world!\n");
 9      return 0;
10  }

Hello World Program!!

// helloworld java
F:\blogspot\Code Source\Hello worldjava\Main.java
1 public class Main
2  {
3      // main function where the execution of program begins
4      public static void main(String args[])
5      {
6          System.out.println("Hello World ^_^");
7      }
8  }

What is C language ?

C Language
C is a high-level and general-purpose programming language that is ideal for developing firmware or portable applications. Originally intended for writing system software, C was developed at Bell Labs by Dennis Ritchie for the Unix Operating System in the early 1970s.
Ranked among the most widely used languages, C has a compiler for most computer systems and has influenced many popular languages – notably C++.

Who is Dennis Ritchie ?

Dennis MacAlistair Ritchie (September 9, 1941 – October 12, 2011), commonly known by his username dmr, was an American computer scientist who "helped shape the digital era." He created the C programming language and, with long-time colleague, Ken Thompson, the UNIX operating system. Ritchie and Thompson received the Turing Award from the ACM in 1983, the Hamming Medal from the IEEE in 1990 and the National Medal of Technology from President Clinton in 1999. Ritchie was the head of Lucent Technologies System Software Research Department when he retired in 2007. The 'R' of the K&R C book stands for his name.
Ritchie was best known as the creator of the C programming language, a key developer of the UNIX operating system, and co-author of The C Programming Language, commonly referred to as K&R (in reference to the authors Kernighan and Ritchie). Ritchie worked together with Ken Thompson, the scientist credited with writing the original Unix; one of Ritchie's most important contributions to Unix was its porting to different machines and platforms.
The C language is widely used today in application, operating system, and embedded system development, and its influence is seen in most modern programming languages. UNIX has also been influential, establishing concepts and principles that are now precepts of computing.
Ritchie was elected to the National Academy of Engineering in 1988 for "development of the "C" programming language and for co-development of the UNIX operating system.