TRANSLATORS


There are 3 types of translators available for the languages

  1. Assembler :This translator is used to convert the programs written in low level language in to Machine language.
  2. Compiler:It is used to convert high level language to Machine level language. It checks for errors in the entire program and converts the program in to Machine language.
    C Uses Compiler As Translator
  3. Interpreter:It is used to convert high level language program into machine level language. It checks for error statements by statement and converts the statement into machine language.

PROGRAM EXECUTION STEPS:

Various steps involved in executing a C program:

  1. Creating a C program.
  2. Compiling a C program.
  3. Linking the program with functions that are needed from C library.
  4. Executing the program.

"Helloworld" C Program

                  #include< stdio.h >
                  void main ()
                  {
                    printf ("Hello World");
                  }
                
OUTPUT: Hello World

Few IMPORTANT points about C PROGRAM

  • Hash (#) include: it is a program file inclusion directive and is used to include header files.
  • #include "filename" or #include < filename >
    • When the filename is included with in double quotation Marks the search for the file made first in current directions and then standard directions.
    • When the filename is include in angular braces (<>), the file is searched in standard directions.
  • printf: It is a function which is used to print data on the screen.
  • void main() It is a function from the where every C program execution start.
Copyright © 2018-2020 TutorialToUs. All rights reserved.