Sunday 20 May 2012

Differentiate among assemblers, compilers, and interpreters.

Compiler is a standard program written & supplied by the computer manufacturers for translating the program JAVA written in high level language into the equivalent machine code of the computer. This process of translating is called compilation. The compilation process consists of first loading the computer with the compiler & then inputting the source program. The compiler produces an object program whose extension is .OBJ.

Assembler translates a program written in assembly language into machine language. It deals with a low level language. It translate complete source program into an object program, identifying any error along the way. The assembler will list or display these errors as well as complete source & object programs. If the program is error free, the job control program will run it immediately or save the object program. So that it may run it later without translating it again.

Interpreter is another type of translator use for translating high level languages into machine code. It translates the program line by line. Each time the program is executed; every line is checked for syntax error and converted to equivalent machine code.

What is a computer virus? Discuss its detection and prevention. Also, give some examples of antivirus softwares.

Virus is basically a small program. The difference between virus and any other program is that a virus manipulates and corrupts information of our computer. A computer virus is a software code that replicates itself. It spreads from program to program and disk to disk manipulating and damaging valuable data. The reasons which make it dangerous is its capabilities to make copies of itself that can be spread from one computer to another. Virus can activate on certain date or when we type a particular command or press a particular key. 

The two main ways of spreading viruses are:-
1. Optical drives
2. Network

In computer field there are five types of viruses found:-
1. File infector virus
2. Boot sector virus
3. Master boot record viruses
4. Multi partite virus
5. Macro viruses

Some popular viruses are given below:-
1. Scores virus
2. Brain virus
3. Rain Drop virus
4. Jerusalem virus
5. Trojan Horse virus and so on.

Virus can be cured with antivirus program. A good antivirus program is one that checks whether the system has been infected or not. These programs stop the viruses from affecting the system. This prevents the virus not to get a foot hold in the system. Some of the antivirus utilities refuse any program to make resident in RAM unless allowed by the user. The detectors warn users about the presence of virus after it has been loaded into the machine or disk. Some of the popular antiviruses are Norton antivirus, avira antivirus, MacAfee etc.

Discuss the significance of operating system. What are the required features of a good operating system? Give some examples of OS.

The operating system controls computer system resources and coordinates the flow of data to end from the micro processor. At the same time it also controls the flow of data between input and output devices such as keyboard & monitor.

Today most of the operating system perform the following function:

  1. Processor management 
  2. Memory management 
  3. Input Output management 
  4. File management 
  5. Operating system is responsible for automatic transition from job to job as directed by special control statement. 
  6. It is responsible for coordination and assignment of compilers, assembler, utility programs and other software to the various users of the computer system. 
  7. It provides facility for easy communication between the computer system & the computer operator (user). It also establishes data security & integrity. 


Following are the name of some operating system:-

  1. DOS 
  2. windows 
  3. UNIX 
  4. LINUX

With the help of a block diagram, explain the organization of a modern computer. Briefly discuss one input device and one output device.

fig. 1

A computer as shown in Fig. 1 performs basically five major operations or functions irrespective of their size and make. These are 1) it accepts data or instructions by way of input, 2) it stores data, 3) it can process data as required by the user, 4) it gives results in the form of output, and 5) it controls all operations inside a computer. We discuss below each of these operations.
1. Input: This is the process of entering data and programs in to the computer system. You should know that computer is an electronic machine like any other machine which takes as inputs raw data and performs some processing giving out processed data. Therefore, the input unit takes data from us to the computer in an organized manner for processing.
2. Storage: The process of saving data and instructions permanently is known as storage. Data has to be fed into the system before the actual processing starts. It is because the processing speed of Central Processing Unit (CPU) is so fast that the data has to be provided to CPU with the same speed. Therefore the data is first stored in the storage unit for faster access and processing. This storage unit or the primary storage of the computer system is designed to do the above functionality. It provides space for storing data and instructions.
The storage unit performs the following major functions:
  • All data and instructions are stored here before and after processing.
  • Intermediate results of processing are also stored here.
3. Processing: The task of performing operations like arithmetic and logical operations is called processing. The Central Processing Unit (CPU) takes data and instructions from the storage unit and makes all sorts of calculations based on the instructions given and the type of data provided. It is then sent back to the storage unit.
4. Output: This is the process of producing results from the data for getting useful information. Similarly the output produced by the computer after processing must also be kept somewhere inside the computer before being given to you in human readable form. Again the output is also stored inside the computer for further processing.
5. Control: The manner how instructions are executed and the above operations are performed. Controlling of all operations like input, processing and output are performed by control unit. It takes care of step by step processing of all operations in side the computer.
FUNCTIONAL UNITS
In order to carry out the operations mentioned in the previous section the computer allocates the task between its various functional units. The computer system is divided into three separate units for its operation. They are 1) arithmetic logical unit, 2) control unit, and 3) central processing unit.
1 Arithmetic Logical Unit (ALU)
After you enter data through the input device it is stored in the primary storage unit. The actual processing of the data and instruction are performed by Arithmetic Logical Unit. The major operations performed by the ALU are addition, subtraction, multiplication, division, logic and comparison. Data is transferred to ALU from storage unit when required. After processing the output is returned back to storage unit for further processing or getting stored.
2 Control Unit (CU)
The next component of computer is the Control Unit, which acts like the supervisor seeing that things are done in proper fashion. The control unit determines the sequence in which computer programs and instructions are executed. Things like processing of programs stored in the main memory, interpretation of the instructions and issuing of signals for other units of the computer to execute them. It also acts as a switch board operator when several users access the computer simultaneously. Thereby it coordinates the activities of computer’s peripheral equipment as they perform the input and output. Therefore it is the manager of all operations mentioned in the previous section.
3 Central Processing Unit (CPU)
The ALU and the CU of a computer system are jointly known as the central processing unit. You may call CPU as the brain of any computer system. It is just like brain that takes all major decisions, makes all sorts of calculations and directs different parts of the computer functions by activating and controlling the operations.



Key board
         Key board is the main input device for our computer. It is fast accurate device. The multiple character allow us to send data to our computer as a steam of characters in a serial manner. It is efficient for jobs like data entry.
         A full size key board has the distance between the centre of the key caps is 0.75 inches. The key caps have a top of about 0.5 inches.
         The key board layout is the array of the keys across the key board. The most popular layout is QWERTY. Q,W,E,R,T,Y are the first six letters of the top row of the alphabets of the QWERTY layout.

Monitor
Monitors are also known as Visual Display Unit (VDU). A monitor is the television like box connected to our computer. It shows what our computer is thinking. It has a display which is technically defined as the image producing device that is the screen. They have great sharpness and colour purity and operate at higher frequencies. They have been classified on the basis of colour, signals and technology.
On the basis of colour monitors are classified into three types:-
1.     Monochrome monitor
2.     Gray colour monitor
3.     Colour monitor
On the basis of signals monitors are classified into two types:-
1.     Digital monitors
2.     analog monitors
On the basis of technology monitors are classified into two types:-
1.     Cathode Ray Tube (CRT) monitors
Mimetic technology monitors (LCD monitors) 

Discuss about the development of computers. Also, mention the various generations and types of computers.


        All though the modern electronic computer are only a recent phenomenon, but the ideas & devices leading to the advent of the computer far back in the history.
In 450 BC, a machine is developed whose name is ABACUS. It is the first known calculating device. It is invented by the chiness. In 1642, the well known French scientist and mathematician, Blaise Pascal invented the first machine which could add & carry digits automatically. This machine was known as adding machine. In 1692, Baron G. Wilhelm von Leibniz of Germany improves upon Pascal’s machine & introduces a mechanism to carry out automatic multiplication of numbers. This machine is known as multiplying machine. In 1833, Charles Babbage, an English mathematician, develop a mechanical calculating device, called difference engine. In 1942, a group of scientist devised the Mark 1 which was the first electromecanical calculator in the world. In 1944, scientist of Moore School of Electrical Engineering, University of Pennsylvania, USA, broad out ENIAC. It was the first electronic calculator. In 1947, the scientists of Cambridge University, UK, broad out EDSAC. It was the first electronic computer in the world. In 1951, Sperry Rand Corporation of USA introduced the first commercial computer to the world & named it Universal Automatic Computer (UNIVAC 1)
Following are the various generations of the computer:
First Generation (1942-1955)
First generation computers use the vacuum tubes technology. It was the only high speed electronic switching device available in those days. Their memory capacity was between 10,000 to 20,000 characters. The instructions written in these computers in machine and assembly languages. Its internal operating speed was in milli seconds (10-3s). Its external speed was thousands of instructions per second.
Second Generation (1955-1964)
Second generation computers use the transistors in place of vacuum tubes. They used magnetic cores for main memory, and magnetic disk and tape as secondary storage media. They were more powerful, more reliable, less expensive, smaller and cooler to operate than the first generation computers. Its memory capacity was 4000 to 64,000 characters. Its internal operating speed was micro seconds (10-6s). Its external speed was up to 1 lakh instructions per second.
Third Generation (1964-1975)
Third generation computers use the integrated circuits. Its memory capacity was 32,000to 4 million characters. Its internal operating speed was nano seconds (10-9s). Its external speed was up to 10 crores instruction per second.
Fourth Generation (1975- 1989)
Fourth generation computers are based on large scale integration or very large scale integration circuits. Development of microprocessor also happened in this generation. Its memory capacity is up to 51,200 to 32 million characters. Its internal operating speed is pico seconds (10-12s) and above. Its external speed is up to 100 millions per second.
Fifth Generation (1989-present time)
Very Large Scale Integration technology became Ultra Large Scale Integration technology in fifth generation resulting in production of microprocessor chips having 10 million electronic components.

On the basis of data, computers are basically classified into three types:
1.     Digital Computer
A digital computer operates directly on decimal digits that represent either discreet data or symbols. It takes input & gives output in the form of numbers, letters & special characters represented by holes in punched card, magnetized area on tapes, printing on paper & so on. It is generally used for business & scientific data processing.
2.     Analog computer
An analog computer measures continuous electrical or physical magnitude like voltage, pressure, shaft rotation etc. They are process control devices. The output from the system may be in the form of a graph produced by a plotting pen or a trace on a cathode ray tube. Its output signals can be used directly to control the operation of some other machine for process. They can perform very complex arithmetical functions at high speed while the actual process is in operation. These computers have many applications in the scientific and industrial field.
3.     Hybrid computer
A computer that combines the most desirable features of both digital and analog is known as hybrid computer. They are suited for the situation where digital processing of data is collected in analog form is desirable. Its processing speed is faster than digital computer and accuracy is greater than analog computer.

On the basis of capacity, price, performance criteria, computer can be classified into four types:
1.     Mainframe computer
Mainframe computers are general purpose computers capable of handling all kinds of problems. It can accept & transfer data from I/O devices at the rate of millions of bytes per second. It can support large number of terminals. They have large online secondary storage capacity and can support a number and variety of peripheral devices like magnetic tapes, drivers. They routinely have high speed cache memories which enable them to process applications faster than mini & micro computers.
2.     Super computer
Super computers are big general purpose computers capable of executing more than ten thousand instructions per second. It has the storage capacity of millions of bytes per chip. The high speed in these computers is due to use of a number of micro processor working in parallel and high storage densities are obtained by using magnetic bubble memories and charged coupled devices, so reducing the cost of storage.
3.     Mini computer
Mini computers are smaller versions of the mainframe. Generally they offer the same computing power as mainframe. The most important advantage of a mini computer over the main frame is that it is cheaper in cost, smaller in size & very reliable. The main use of these systems is in education, in local government etc.
4.     Micro computer
The micro computers are built around micro processor chips. It is a silicon wafer about 5mm square & 0.1mm thick with layer of etched & printed circuits. It contains all the elements require to process binary in coded data. It is possible to pack a complete micro computer in a single chip but usually several chips are used. A typical micro computer has a key board for input & uses floppy drives, CDs, or DVDs to inter data and programs to receive outputs.

Explain the following DOS commands: CHKDISK, FORMAT, ATTRIB, and PATH.


a. CHKDISK
This command is used for analyzing, diagnosing & correct common disk errors (hard disk). It produces reports on the status of files on disk.
If we invoke this command without any parameter it will analyse the current drive. If we invoke the command with drive name, it will analyse that drive.
C :\> CHKDISK
C :\> CHKDISK D
b. FORMAT
Formats prepare a blank disk for receiving & storing data, or create a new blank disk from a used one.
It requires a specific drive letter for the disk to format. If we want to cancel this command use ctrl+c.
c. ATTRIB
This command is used to display or change the attributes of a file. File can be declared read only, read write, archived, not archived, hidden or not hidden.
d. PATH
It specifies a list of subdirectories where DOS looks for executable program file.
If we invoke this command without parameter it displays the current search path. If we want to change the search path, then invoke this command with a list of the drives & subdirectories where we want DOS to look forv program files.

What is a compiler? How does it differ from an interpreter?


    Compiler is a standard program written & supplied by the computer manufacturers for translating the program JAVA written in high level language into the equivalent machine code of the computer. This process of translating is called compilation. The compilation process consists of first loading the computer with the compiler & then inputting the source program. The compiler produces an object program whose extension is .OBJ.
Interpreter
Compiler
It translates the program line by line.
It translates the entire program at once.
It requires less main memory.
It requires more main memory
Each time the program is executed, every line is checked for syntax or error and converted to equivalent machine code.
It converts the entire program to machine code, when all the syntax error are removed and executes the object code directly.
Source program and the interpreter are required for execution.
Neither source program nor compiler are required for execution.
It is good for fast debugging & testing.
It is slow for debugging & testing.

Discuss the different types of printers.


   The printer generates a permanent hard copy of our work on paper. Printers are available with the variety of printing mechanism, speed and varying qualities. There are mainly two types of printers:
1.     Impact printer
It operates like a typewriter, pressing a typewriter press a type phase against a paper on a ink ribbon or carbon ribbon. Impact printers include all printers that work by striking on ink ribbon. Daisy Wheel, Dot Matrix, Drum printer, Line printer, Chain Printers are the impact printers. These type of printers make noise during printing.
2.     Non-impact printer
This type of printer use thermal, electrostatic, chemical, & inkjet technology. Non impact printers include laser printers, thermal printers, & inkjet printers. This type of printer does not make noise during printing.

What is an Operating System? Explain the multiprogramming operating system.


           The operating system controls computer system resources and coordinates the flow of data to end from the micro processor. At the same time it also controls the flow of data between input and output devices such as keyboard & monitor.
          Multiprogramming operating system allows more than one program to run concurrently. In a given moment, only one task is actually being executed but within a larger time span of several minutes, the computer is processing several programs by alternating between actual executions. When one job needs to do I/O, another can resume. So two or more independent programs are executed in the same time span by inter leaving their execution.

Discuss what is meant by 4GL & its importance?


          These languages are a class of software designed to simplify the task of developing a new application. These languages are very easy to use. It is designed to concentrate on what task is to be accomplished as compare to 3GL, which focus on how to solve a problem.
          This is also known as problem oriented languages, designed to solve specific problem. The main purpose of these languages is to make more efficient applications. These are also known as DBMS (Data Base management System). It is used to manage data in a systematic order. E.g. FoxPro.
          Importance of 4GL:-
i.                   It is easy to use.
ii.                 A little or no computer knowledge is required to access the 4GL.
iii.              It is machine independent.
iv.              In this language maintenance and modifications of data is very easy.

Explain MICR, OCR & OMR.


           Magnetic Ink Character Reader (MICR)
It allows the computer to recognize characters printed using magnetic ink. It is a direct entering method used in banks. This technology is used to automatically read numbers on the bottom of the check. A special purpose machine known as a reader reads characters made of ink containing magnetized particles. A related technology is the magnetic strip used on the back of credit cards & bank debit cards that allow readers such as Automatic Teller Machine (ATM) to read account information.
Optical Character Recognisation (OCR)
It refers to the branch of computer science that involves reading text from paper and translating the images into a form that a computer can manipulate. All OCR system includes an optical scanner for reading text & sophisticated software for analyzing images. The potential of the OCR system is enormous because they enable users to hardness the power of computer to access printed document.

           Optical Mark Reader (OMR)
          It is also known as sense reader. It is used to read the document or answer sheet by means of light. It can read up to 450 to 650 documents per minute. It is commonly used for aptitude test.



Discuss the characteristics of a monitor.


Following are the characteristics of a monitor:
a)     Size:
The most important aspect of a monitor is its size. Screen sizes are measured in diagonal inches, the distance from one corner to another opposite corner diagonally.
b)    Resolution:
     The resolution of a monitor indicates how density the pixels are packed. Pixel is short short for picture element. A pixel is a single point in a graphic image. Graphic monitors display pictures by dividing the display screen into millions of pixels arranged in rows and columns. On colour monitor each pixel is actually composed of three dots namely a red, a green, and a blue. The quality of a display monitor largely depends on its resolution.
c)     Band Width:
      The amount of data that can be transmitted in a fixed amount of time. For digital devices, the band width is usually expressed in bits or bytes per second (bps). For analog devices it is expressed in cycle per second or Hertz (Hz).
    d)    Refresh Rate:
       Display monitors must be refresh many times per second. The refresh rate determines how many times per seconds the screen is to be red drawn. The refresh rate of a monitor is measured in Hertz. The faster the refresheris, the less the monitor flickers.
e)     Interlacing:
       It is a technique in which instead of scanning the image one line at a time, it scans alternately i.e. alternate lines are scanned at each pass. It is used to keep band width down. Since inter leaked displaced have been reported to be more flickery, with better technology available, most monitors are non interlaced now.
f)      Dot per Inch:
       It is measured for the actual sharpness of the on screen image. This depends on both the resolution & the size of the image. Practical experience shows that a smaller screen has a sharper image at the same resolution than does a large screen. This is because it will require more dots per inch to display the same number of pixels.
     g)  Dot Pitch:
      A measurement that indicates the vertical distance between each pixel on a display screen. It is measured in millimeter. The dot pitch is one of the principle characteristics that determine the quality of display monitors.
h)  Convergence:
       It refers to how sharply an individual colour pixel on a monitor appears. Each pixel is composed of three dots namely a red, a green and a blue. If the dots are badly mis converged, the pixel will appear blurry.

Discuss the different types of memory.


A memory system can be considered to be consisting of three groups of memories.
These are following:-
1.     Internal processor memory
2.     Main memory / primary memory
3.     External memory / secondary memory
1. Internal processor memory
          This consist of a small set of high speed registers which are internal to a processor and used as temporary location where actual processing is done.
          Registers are internal processor memory.
2. Primary memory / Main memory
          It is a large memory that is fast but not as fast as internal processor memory. These memories are accessed directly by the processor.
          ROM and RAM are the examples of primary memory.
3. External memory / Secondary memory / Auxiliary memory
          This is large in size than main memory but slower than main memory. It can be used as an overflow memory or virtual memory. In case of, the capacity of main memory has been acceded than these memories are not acceded directly by a processor. First the information of these memories are transferred to the main memory & then the information can be accessed to main memory.
          Hard Disk, Optical Storage, Pen Drive and so on are the examples of External or Secondary memory.

Explain with the help of a block diagram, the basic components of a computer system


 A complete computer system consists of four parts:  hardware, software, one or more user, & data.
Hardware:-
The physical devices that make up the computer are called hardware. Hardware is any part of the computer we can touch. Computer hardware consists of interconnected electronic devices that we can use to control the computer’s operation, input, & output.
Software:-
          Software is a set of instructions that makes the computer perform tasks. Some programs exist primarily for the computer’s use, helping it perform tasks & manage its own resources. Other types of programs exist for the user, enabling him or her to perform tasks such as creating documents.
Users:-
          People are the computer operators also known as users. It can be argued that some computer systems are complete without a person’s involvement; however, no computer is totally autonomous. Even if a computer can do its job without a person sitting in front of it, people still design, build, and program & repair computer system.
Data:-
          Data is a raw material which is used for data processing.

Define gets(), malloc() function, pointer, union, and recurtion.


gets()
The name of the function gets() stands for “get string”. The gets() function reads till the next new line character Enter key and can include spaces and taken in a string thus reading whole sentences and adds the NULL character to it and assign it to the required variables which comes as an argument of the function. Following example demonstrates the use of the function gets().
/*Demonstration of gets() function */
main()
{
char employee_name[20];
gets(employee_name);
printf("Employee: %s\n",employee_name);
}

malloc ( ) function
The malloc() function allocates a specified number of bytes in memory. The allocated region is not filled with zero. The starting address is returned if the function is successful. A zero is returned if the function fails to allocate memory. To assign sufficient memory for x, we can make use of the library function malloc(), as follows:
X = malloc(10*size of(int))
This function reserves a block of memory whose size (in bytes) is equivalent to the size of an integer.

Pointer
A pointer is a derive data type in C. it is built from one of the fundamental data types available in C. Pointer contains memory address contains the instruction and data as a record.
Pointer is used to access and manipulate data stored in the memory. It is also known as referential variable.

Union
Unions are concept borrowed from structures and therefore follow the same syntax as structures. However, there is a major distinction between them in terms of storage. In structures, each member has its own storage location; where as all the members of a union uses the same location. This implies that, although a union may contain many members of different types, it can handle only one member at a time. Like structure, a union can be declared using the keyword union as follows:
union item
{
   int m;
   float x;
   char c;
}code;
This declare a variable code of type union item.

Recursion 
Recursion is a special case of chaining of a function, where a function calls itself. A very simple example of recursion is given below:
main()
{
          printf("This is an example of recursion\n");
          main();
}
When executed this program will produce an output something like this:
          This is an example of recursion
          This is an example of recursion
          This is an example of recursion
Execution is terminated abruptly; otherwise the execution will continue indefinitely.

Define break, continue, and scanf().


break
     We often come across situation where we want to jump out of a loop instantly, without waiting to get back to the conditional test. The keyword break allows us to do this. When break is encountered inside any loop, control automatically passes to the first statement after the loop. A break is usually associated with an if.

continue
       In some programming situation, we want to take the control to the beginning of the loop, by passing the statements inside the loop, which has not yet been executed. The keyword continue allows us to do this. When continue is encountered inside any loop, control automatically passes to the beginning of the loop. A continue is usually associated with an if.

scanf()
       scanf() is a function to receive the value from the keyboard by the user. The ampersand (&) before the variables in the scanf() function is a must, & is an ‘Address of’ operator. It gives the location number used by the variable in memory. A blank, a tab or a new line must separate the value supplied to scanf().

Define Stdio.h, Fread (), Putchar ().


Stdio.h
Stdio.h is one of the header files provided in library of ‘C’ language. It stands for Standard input output header file. It contains various input output function like scanf, printf etc. For using input output function we need to include stdio.h at the beginning of the program.

Fread ()
This function is related to file handling of ‘C’. It is used to read a block of data from a given file. It is also used to read one or more structure from a given file to a memory location.
The general syntax of fread function is:
Fread(ptr,size,nitems,fptr);
Where ptr is a pointer to the location to receive the structure, size is the size in bytes of each structure to be read, nitems is the number of the structures to be read and fptr is the pointer to the file to be read.
   
Putchar ()
putchar() is a character handling function supported by C to output the values of character variables. The function putchar requires one parameter. We can use this function repeatedly to output a string of characters stored in an array using a loop. For example:
char name[6] = "PARIS"
for(i=0;i<5;i++)
putchar(name[i]);
putchar("\n");

Define Fseek ().


This function is related to the file handling of ‘C’. This function moves the file pointer to a specific position in a file. The general syntax of fseek() function is as following:-
fseek(fptr,offset,mode) where fptr indicates the file pointer of a file, offset indicates how many position moves forward or backward the file pointer which depends on mode and mode indicates from where file pointer should move. If mode = 0 it means from the beginning of the file, if mode = 1 it means from the current position, or if mode = 2 it means from the end of the file.

Write a program to reverse the digits of a number using for loop.


//program to reverse the digits of a number using for loop
void main()
{
int num,rev=0,a,b,i;
clrscr();
printf("Enter any number ");
scanf("%d",&num);
for(a=num;a>0;a/=10)
{
b=a%10;
rev=rev*10+b;
}
printf("\n%d is the reverse of %d",rev,num);
getch();
}
Output
Enter any number 1234
4321 is the reverse of 1234

Write a program to print the sum of all odd number between 1 to 10 using do while loop.


 //program to print the sum of all odd numbers between 1 to 10 using do while loop
void main()
{
int i=1,sum=0;
clrscr();
do
{
sum=sum+i;
i+=2;
}while(i<=10);
printf("the sum of all odd numbers between 1 to 10 is %d",sum);
getch();
}
Output
        the sum of all odd numbers between 1 to 10 is 25

Write a program to generate table of number using while loop


/*program to generate table of any number entered through the key board using while loop*/
void main()
{
int a,b,c;
clrscr();
printf("Enter any number for its multiplication table ");
scanf("%d",&a);
b=1;
while(b<=10)
{
c=a*b;
printf("\n%d\t*\t%d\t=\t%d",a,b,c);
b++;
}}
Output
Enter any number for its multiplication table 5

5   *     1        =       5
5   *     2        =       10
5   *     3        =       15
5   *     4        =       20
5   *     5        =       25
5   *     6        =       30
5   *     7        =       35
5   *     8        =       40
5   *     9        =       45
        5   *   10      =       50

What are pointers? Distinguish between the address stored in the pointer and the value at that address.


A pointer is a derive data type in C. it is built from one of the fundamental data types available in C. Pointer contains memory address contains the instruction and data as a record.
Pointer is used to access and manipulate data stored in the memory. It is also known as referential variable.
All the variables defined in a program stored at specific memory location. If we want to get the address of the variable then we use “&” before the variable name. For example: int x=2;
The above declaration tells the C compiler to perform following actions:
1. Reserve space in the main memory to hold an integer value.
2. Associate the name x with this memory location.
3. Store the value 2 at this location.
       x location name
       2 value at the location
  6485 location address
To get the address of an integer variable, it has to be used with unary operator ‘&’ preceding the variable name. The memory address for the variable x holding the value 2 is 6485.