-->

Facebook

Jasper Roberts - Blog

Tuesday, September 30, 2014

Write a C Program to display multiplication table.

// Write a C Program to display multiplication table.

#include<conio.h>
#include<stdio.h>

void main()
{
     int n,multi;
     int i,j;

     clrscr();


     printf("enter the end:");
     scanf("%d",&j);
      
     printf("enter the number:");
     scanf("%d",&n);

     for(i=1;i<=j;i++)
     {
          multi = n * i;
          printf("\n %d * %d = %d",n,i,multi);
     }
     getch();
}

OUTPUT:

multiplication table in c language
multiplicationtable.c

          DOWNLOAD
           

Monday, September 29, 2014

welcome to mech - b class in c for all

welcome to mech - b class in c for all website for pdf and .docx download

Write a C Program to check entered year is a leap year or not.

DOWNLOADDOWNLOAD

#include<stdio.h>
#include<conio.h>

void main()
{
  int year;

  printf("Enter a year:");
  scanf("%d", &year);

  if(year%4 == 0)
      printf("\n This is a leap year.", year);
 
  else if (year%400 == 0)
      printf("\n This is a leap year.", year);

  else if(year%100 == 0)
      printf("\n This is not a leap year.", year);
 
  else
      printf("\n This is not a leap year.", year); 

  getch();
}

OUTPUT:
 Enter a year: 12
This is a leap year.

Saturday, September 27, 2014

Difference between high level language and low level language


DOWNLOAD DOWNLOAD



High-level Language
Low-level languages
Understanding
Human can easily understand high level languages.
Difficult to understand for human.
Execution
Execution is slow compared to low level languages.
Execution is very fast compared to low level languages.
Structural
High level languages are well structured programming.
Low level languages do not provide structured programming.
Modification
It is very easy to modify.
It is very difficult to modify.
Complexity
It is simple.
It is very complex.
Facility at hardware level
Do not provide much facility at hardware level.
Provides facility to write programs at hardware level.
Knowledge of hardware
Knowledge of hardware is not required to write programs.
Deep knowledge of hardware is required to write programs.
Applications
High level languages are normally used to write application programs.
Low level languages are normally used to write hardware programs.
Examples
Ada , Modula-2 , Pascal, COBOL, FORTRAN, BASIC
Assembler

Thursday, September 25, 2014


DOWNLOAD DOWNLOAD

Wednesday, September 24, 2014

Algorithm

- Algorithm is a step-by-step solution of a given problem.

- In C Language, Algorithm represents the step-by-step solution.

- Advantages of Algorithm:
1. It is very easy technique to understand the logic of a given problem.
2. Simple and Very easy to write.
3. Mistakes can be identified very easily.

- Disadvantages of Algorithm:
1. Its very time consuming.
2. Very difficult to represent looping.
3. Complex and very big task are difficult to represent in algorithm.

- Example-1: An Algorithm for display " Hello World!! "
    Step-1: Start
    Step-2: Print "Hello World!!"
    Step-3: Stop.

- Example-2: An Algorithm to add two values.
    Step-1: Start
    Step-2: Input a,b
    Step-3: Calculate Sum = a + b
    Step-4: Print Sum
    Step-5: Stop.

Flow Chart

- Flow Chart is a graphical representation of a given problem.
- By using the various flow chart symbols we can represent a problem graphically


- Various Symbols of Flow Chart:

Flow Chart & Symbols
Flow Chart Symbols

- Example:
   Draw a Flow Chart to find out the largest number among three numbers.

Flow Chart
Largest Number Among Three Numbers

Tuesday, September 23, 2014

Monday, September 22, 2014

Hardware & Software

What is Computer?
A Computer is Electronic device that can
·         accept data,
· store data,
·   Process data as desired,
·     retrieve the stored data as and when required
·     print the result in desired format.


-Computer consists of mostly two types of components.
-These components (1) hardware and (2) software.
 
Computer System


(1) Hardware:
-The stuff you can actually see and touch are Hardware.
Examples:
1. Monitor
2. Motherboard 
3. CPU 
4. RAM 
5. Expansion cards
6. Power supply 
7. Optical disc drive
8. Hard disk drive
9. Keyboard 
10. Mouse




1. Monitor:
A computer monitor is an electronic device that shows pictures. Monitors often look similar to televisions.
There are three types of computer displays:
  1. CRT monitor
  2. LCD monitor
  3. Video Projectors

1. CRT Monitor
2.LCD monitor
          

2. Mother Board
  •   The motherboard or main board is the main circuit board in a  complex electronic system, like a computer.
  •   It is the most 'central' part of a computer.
  •   All of the different parts of the computer are connected to the motherboard.
  •   In most computers, the motherboard is a big green board, but many come in different colors like black, red and yellow.

 
Mother Board

3. A Central Processing Unit (CPU)
  •             A Central Processing Unit (CPU) is a set of components in digital Computer that interprets computer program instructions and process data and provides the formatted output.
  •              2 Major Manufactures are there:

¡  Intel
¡  AMD
CPU


4. Random access memory (RAM)

RAM is the memory or information storage in a computer.
  • RAM is used to store running programs and data for the programs.
  •   Data or information in the RAM can be read and written quickly in any order.
  •   Normally, the random access memory is in the form of computer chips.
  •   Usually, the contents of RAM are accessible faster than other types of information storage but are lost every time the computer is turned off.

RAM


5. The expansion card
  •             The expansion card in computing is a printed circuit board that can be inserted into an electrical connector, or expansion slot on a computer motherboard, backplane or riser card to add functionality to a computer system via the expansion bus.
  •    An expansion bus is a computer bus which moves information between the internal hardware of a computer system (including the CPU and RAM) and peripheral devices. It is a collection of wires and protocols that allows for the expansion of a computer.

Expansion Card

 6. A power supply unit (PSU)
  •       PSU converts mains AC to low-voltage regulated DC power for the internal components of a computer.
  •          Modern personal computers universally use a switched-mode power supply.
  •          Some power supplies have a manual selector for input voltage, while others automatically adapt to the supply voltage
    7. An optical drive 
    •        It is usually a CD drive or DVD drive.
    •             Optical means it uses lenses.
    •            The drive uses a light called a laser. A laser is the most exact and powerful sort of light but the laser in the drive is very, very small.
    •  —  Types of Optical Drive

    ¡  CD Drive
    ¡  DVD Drive
    ¡  Blue-ray Drive
    ¡  HD-DVD Drive

      
    8. A hard disk drive (HDD)
    • HDD is something used by computers to store information.
    •   Hard disks use magnetic recording (similar to the way recording is done on magnetic tapes) to store information on rotating circular platters.
    •   The capacity of a hard drive is usually measured in gigabytes (GB). 

    HDD
              
      9. A computer keyboard 
    •       A computer keyboard is an important device that allows a person to enter symbols like letters and numbers into a computer.
    •            It is the main input device for most computers.
    •           The most popular type is the QWERTY design, which is based on typewriter keyboards.

    Computer keyboard

    10. A computer mouse 
    •      It is an input device that is most often used with a personal computer.
    •          Moving a mouse along a flat surface can move the on-screen cursor to different items on the screen.
    •          Items can be moved or selected by pressing the mouse buttons (called clicking).

     
    Computer Mouse

    (2) Software:


    Software is a set of instructions which makes a computer to perform a particular task.
    There are three types of software:
        (a). System Software
        (b). Application Software


    1.      (a) System Software

    System software is a collection of one or more programs used to control and coordinate the hardware and other application software.

    Generally the system software may perform the following functions:
    ·         Communicates with hardware devices.
    ·         Controls and monitors the proper use of various hardware resources like CPU, memory, peripheral devices like monitor, printer etc.
    ·         Supports the execution and development of other application software.

    Examples of system software are:
    1.    Operating system
    2.    Programming language translator
    3.    Communication software
    4.    Compiler and Interpreter

    2.      (b) Application Software
    Application software is a collection of one or more programs used to solve a specific task.
    Generally software used in banking industry, airline/railway reservation, generation of telephone or electricity bills etc. all fall under application software.

    Examples of application software are:
    1.       Word processing software
    2.       Database Software
    3.       Education Software
    4.       Audio-Video Software

    Types of Software:


    Software is a set of instructions which makes a computer to perform a particular task.
    There are two types of software:
    1. System Software
    2. Application Software


    System Software

    - System software is a collection of one or more programs used to control and coordinate the     hardware and other application software.
    - Generally the system software may perform the following functions:
    • Communicates with hardware devices.
    • Controls and monitors the proper use of various hardware resources like CPU, memory, peripheral devices like monitor, printer etc.
    • Supports the execution and development of other application software.

    Examples of system software are:
    1.    Operating system
    2.    Programming language translator
    3.    Communication software
    4.    Compiler and Interpreter


    Application Software

    - Application software is a collection of one or more programs used to solve a specific task.
    - Generally software used in banking industry, airline/railway reservation, generation of              telephone or electricity bills etc. all fall under application software.

                Examples of application software are:
    1.       Word processing software
    2.       Database Software
    3.       Education Software
    4.       Audio-Video Software