What is the pointer and explain different pointer concepts in Pascal?

devquora
devquora

Posted On: Feb 22, 2018

 

A pointer is a dynamic variable and its value it the address of some other variable. This means it shows the address of memory location of another variable. You need to learn the pointer because some tasks are easily performed with the use of it. Sometimes, the tasks like dynamic memory location can’t be performed without the use of a pointer. You must declare the pointer like other variables or constants, to use in the program later. There are different pointer concepts in Pascal:

  1. Arithmetic Pointer: The operations such as +, -, increment and decrement can be performed on pointers.
  2. Pointer to Pointer: pascal allows to have pointer on another pointer and so on.
  3. Array of Pointers: Array is used to define the number of pointers in it.
  4. passing Pointer to Subprogram: Pascal allows to pass the pointer as an argument to a subroutine or subprogram. It can be passed by reference or by address.
  5. Return subprogram from subprogram: Pascals allow the subprogram to return a pointer.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Pascal Interview Questions

    What do you understand by Pascal?

    This is the first question every interview may ask, so make a good definition in your mind. Pascal is a programming language which supports data structure and the structured programming. It is basical...

    Pascal Interview Questions

    Why Pascal?

    Pascal is a computer programming language which encourages you to enhance your programming skills. It is a language that you may easily learn and practices the programming techniques. It let you use f...

    Pascal Interview Questions

    Why Pascal is named as Pascal?

    Designed in 1968-1969 by Niklaus Wrath, it was first published in the year 1970. It is named after the Blaise Pascal who was French Mathematician and philosopher. He is famous for his invention of cal...