Skip to main content

What is pointer ? List the advantages of using pointer in C


Answer:

Pointer: A pointeris a derived data type in C. It is built from one of the fundamental data type available in C. pointers contain memory address as their value.



Advantage:
Ø  Pointers are more efficient in handling arrays and data tables.
Ø  Pointers can be used to return multiple values from a function via function arguments.
Ø  Pointers permit references to functions and thereby facilities passing of functions as arguments to other functions.
Ø  The use of pointer arrays to character steings results in saving of data storage space in memory.
Ø  Pointers allow C to support dynamic memory management.
Ø  Pointers provide an efficient tool for manipulating dynamic data structures such as structures.
Ø  Pointers reduce length and complexity of programs.
Ø  They increase the execution speed and thus reduce the program execution time. 

Popular posts from this blog

Draw the basic organization of computer

Answer:                 The basic organization of computer__ Input Unit: ·          It accepts (or reads) instructions and data from outside. ·          It converts these instructions and data in computer acceptable form ·          It supplies the converted instructions and data to the computer system for further processing. Central Processing Unit (CPU): Control Unit: Control unit of a computer system manages and coordinates the operations of all other components of the computer system. Arithmetic Logic Unit(ALU): Arithmetic logic unit of a computer system is the place, where the actual executions of instruction, takes place during processing operation. Storage Unit: Primary Memory: It is volatile ( loses data on power ...

Describe the four basic data types. How could we extend the range of values they represent?

Answer: The basic four data types are: Data Type Integer Type Character Type Floating Point Type Void Type signed int short int long int unsigned unsigned int unsigned short int unsigned long int char signed char unsigned char float double long double