You must Sign In to post a response.
  • Category: Software

    Query about computer software


    Want to know about pointers in C language? Go through the answers.

    Why pointers of c++ language is doing important role at the time of making any software?
  • #140482
    Pointers are variables/data types which stores the addresses/data and also can be null. Types of pointers are like Integral, Floating and void.

    Integral pointers are capable of handling the whole numbers.
    Floating pointers are the one specifying values that may have fractional parts.
    Void pointers describes an empty set of values and it is primarily to declare functions that return no values or to declare generic pointers to arbitrarily typed data

    Like in Java these pointers help us to get the access to the data and use it in our script. With Integral and floating we can perform the arithmetic operations which is used widely.

    Some times peace is better than being Right!!!

  • #140483
    Moving this to AE section.
    Live life Kingsize!

  • #140485
    It's easy to understand roles of pointers in C. Variables hold the data in memory. And pointers are pointing to space where variables are holding the data. These pointers come in different forms - integer, float and void. Integer pointer have whole numbers and no decimal points. In case of float pointer, it contains the numbers with decimal pointer. As for the void t does not have the return value.

    C is less likely to be used for desktop level software. C and C++ are used on creating system level software. Here you need pointers to free up memory space. And also for things like clearing ROM or operating system cache. So this has it's use on system level software.

  • #140515
    pointers are very essential dynamic memory location for data structures efficient handling for large amount of data. If pointers are not there then you should locate all the data globally. pointer is very useful tool in c++ .Basically pointer is variable which holds memory address than a value.
    For Eg int myVariable; ---this will hold a variable which has integer value.
    int *my pointer; --this will hold portion of memory which has the address of _another_ portion of memory of an integer value.

    *myPointer=myVariable ;--- this means that a pointer now holds an memory location for variable.
    In programming language pointers are always used as a reference to another variable. Pointers cannot be used for referencing existing variable.

  • #140581
    Pointers in C++ act like an address of a particular value. For example if you want to store something then you need some variable and to define the type of variable you need data type so what will give is the address of the value stored in the variable of the particular data type. consider the following:

    int cool = 5;

    now here int is the data type and 5 is the value. 5 get to store in variable cool but to refer the value of the variable without referring to direct variable we need address of the variable suppose address of the variable is 5000. so here 5000 will give me value 5 if address of the variable is 5000. hence pointer plays indirect roles to make any software because programming even a single bit of computer information is stored in a memory and to retrieve that information the pointer is very essential.


Sign In to post your comments