Sunday 3 July 2011

C language

I have learned the C language in 10 days. It is very useful language. It is useful to learn any another Computer language. C becomes a basic for writing an OS such as Windows, Unix, Linux etc. It is basically a Procedure Oriented Programming Language (POP).

       C language was found by Dennis Ritche at AT&T's bells Laboratories,USA. It is an advancement to Basic CPL... the then programming language. 
        Now in order to communicate with the computer, C language is used. C is a middle level language capable of interacting with the both hardware & software. 

How to learn C language? 
  1. First learn the Alphabets & numbers.
  2. Next, learn the Keywords.
  3. Next, learn how to write an instruction.
  4. Finally, how to write a program.
Now lets us see it in detail.
  1. C supports all Alphabets, Numbers & special symbols.
  • Keywords are the words reserved by th compiler 
  • int - to declare an integer
  • float - to declare a float i.e. decimal point numbers.
  1. Instruction follows some rules
  • Declaration type instruction declares a data type.
  • I/O instructions for input and output.
  • control instructions to take control to the specified point....etc
Now, lets see a sample program
   #include<stdio.h>    /* header file */
   void main()     /* function*/
   {
      int a,b,c;       /Declaration instruction/
            
      printf("enter the values");      /* for output */
      scanf("%d%d",&a,&b);        /* for input */
      
      c=a+b;          /*Arthematic instruction */
      printf("\n %d",c);
}

Thursday 9 June 2011

Welcome

Welcome to my blog. A blog is a website or a part of a website.

Friday 27 May 2011

How to make an electromagnet


What you need:

•    Battery
•    Insulated copper wire with ends stripped
•    Large iron nail
•    Small paper clips or staples

Try This:

1.    Wrap the copper wire around the nail and touch the ends of the wire to the battery. Be careful to always wrap the wire in the same direction. Wrap it as tightly as you can. Try to pick up the paper clips. Does it work? Be careful, the battery may get hot!

2.    Try the experiment again with more wire wrapped around the nail. Can you pick up more paper clips? What happens if you use a bigger nail? A nail made of a different material?


What’s going on?

An electromagnet is a magnet that can be turned on and off. In this experiment, the battery is a source of electrons. When you connect the wire to the battery, the electrons flow through the wire. If there is not a complete circuit, the electrons will not flow. Electrons behave like little magnets and when they flow through a wire, they create a magnetic field, which turns the nail into a magnet that can pick up paper clips and staples!

Internet and Intranet

Introduction         
              A network within an organization is called as intranet whereas a network between the organizations is called as Internet. Computers connected together to form a multitasking operation within an organization is called intranet. Intranet is useful only within the organization. Internet can be used anywhere in the world.