lunes, 29 de julio de 2013

C

Hi people, this time I'm gonna write about a programming language that, in my opinion, the school must teach the kids in primary level, and become the second lenguaje, but that would be a dream, so, for us, that we did not learn C until the University. I'm going to tell you some stuff about it. The C language is in fact an evolution of 2 past languages called BCPL and B. Dennies Ritchie in 1972 evolved the B language in the Bell laboratories in a DEC PDP-11 computer.The C language is wide, so wide that is used in many platforms.

Well let's star with something easy, Because I learn better seeing an example Im going to write a simple one, to explain some C.

This Basic program prints text in a window

#include <stdio.h> /*This is a directive of the preprocessor of C.
This can be known as header of C, this headers are used to to call
the funtions from the library.*/


int main (void) /*this line takes part of almost ALL programs in C if the int
is not ther the program can't be initalized.The () that appear after main says
that main is a construction block for programs called "function"*/


  { //the () indicates the body of the function. this one indicates the beggining
      printf("Welcome to C! \n"); /*the printf is an instruction that indicates
      to the computer what to do, in this case is to print in a console window
      the word or words between the "" inside the () */

     
      return 0;//This line indicates that the program finished with success
  } // This one indicates the end of the function


This is the result of the program


Fig01.-This is the window appears if you run the program that is written up there



I hope this help for introduction to C, I'm going to write more entries about it. Thanks for reading.




Bibliography:
C/C++ Cómo programar.4ta Edición.Deitel

No hay comentarios:

Publicar un comentario