Sunday, November 20, 2011

Programming Overview

1. What is a Computer?
-an electronic device that accept user input, process it into useful information, and store it for future use.
2. What is a Program? 
-a list of instruction arranged in logical order that tells the computer exactly what to do.
3.What is a Programming Language?
-English is a natural language.  It has words, symbols and grammatical rules.
-A programming language also has words, symbols and rules of grammar.
-The grammatical rules are called syntax.
-In a programming language a sentence either means one thing or it means nothing
4. Turbo C- A programming language
/* This program will compute the sum of two numbers.*/
#include <stdio.h>
void main(){
  int n1;
  int n2;
  int sum=0;
  printf("Input First Number: ");
  scanf("%d",&n1);
  printf("Input Second Number: ");
  scanf("%d",&n2);
  sum=n1+n2;
  printf("Sum=%d\n",sum);
  }
5. How Turbo C works?

No comments:

Post a Comment