CrazyEngineers
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Ankita Katdare

    AdministratorNov 20, 2013

    Pointer is a "variable" that stores the address of another variable, right?
    Whenever we declare any variable, a random block of memory is chosen and value will be stored in that memory location.
    Similars is the case with pointers!
    Use sizeOf operator to check the size of any pointer variable.
    Are you sure? This action cannot be undone.
    Cancel
  • Alok mishra

    MemberNov 20, 2013

    Ankita Katdare
    Pointer is a "variable" that stores the address of another variable, right?
    Whenever we declare any variable, a random block of memory is chosen and value will be stored in that memory location.
    Similars is the case with pointers!
    Use sizeOf operator to check the size of any pointer variable.
    clear , say there is a pointer variable which is 2 byte large in size so what i am asking is what are these 2 bytes ,size of the address the pointer is pointing to ,or size of block of memory the pointer is pointing to (but the size of memory block the pointer is pointing to might be larger than 2 bytes ) ?
    Are you sure? This action cannot be undone.
    Cancel
  • Aadit Kapoor

    MemberNov 21, 2013

    #include <stdio.h>
    #include <stdlib.h>
    
    main()
    {
        int a = 12;  /* 4 bytes stored in memory system */
        int *p = &a; /* 4 bytes stores in memory system for p and now p is pointing to a variable */
    
        printf("Size of variable a = %d,Size of pointer variable p = %d\n",sizeof(a),sizeof(p)); /* Ouput :  Size of variable a  = 4 and Size of variable p = 4 */
    }
    pointer is noting but a variable that points to its type.For example int pointer variable will only point to int variables.
    But there is a void pointer which is like a generic pointer in c.It can contain any types of variables,but void pointers are not capable of pointer arithmetic operations.
    Are you sure? This action cannot be undone.
    Cancel
  • Alok mishra

    MemberNov 21, 2013

    Aadit Kapoor
    #include <stdio.h>
    #include <stdlib.h>
    
    main()
    {
        int a = 12;  /* 4 bytes stored in memory system */
        int *p = &a; /* 4 bytes stores in memory system for p and now p is pointing to a variable */
    
        printf("Size of variable a = %d,Size of pointer variable p = %d\n",sizeof(a),sizeof(p)); /* Ouput :  Size of variable a  = 4 and Size of variable p = 4 */
    }
    pointer is noting but a variable that points to its type.For example int pointer variable will only point to int variables.
    But there is a void pointer which is like a generic pointer in c.It can contain any types of variables,but void pointers are not capable of pointer arithmetic operations.
    yes thats what i know but a statement in a book confused me .it(the book) was saying that pointer variables are 2 byte wide in DOS and 4 byte wide in windows/linux.
    Are you sure? This action cannot be undone.
    Cancel
  • Anand Tamariya

    MemberNov 21, 2013

    The size refers to the size of data type which in fact is different in DOS and other OSes. This is required by specification.
    Are you sure? This action cannot be undone.
    Cancel
  • Aadit Kapoor

    MemberNov 21, 2013

    Alok mishra
    yes thats what i know but a statement in a book confused me .it(the book) was saying that pointer variables are 2 byte wide in DOS and 4 byte wide in windows/linux.
    As Anand Bhaiya said it varies from different operating system.
    Are you sure? This action cannot be undone.
    Cancel
  • Alok mishra

    MemberNov 21, 2013

    Aadit Kapoor
    As Anand Bhaiya said it varies from different operating system.
    got it
    Are you sure? This action cannot be undone.
    Cancel
  • najeeb88

    MemberNov 22, 2013

    Thank so much for sharing your thought with your readers.


    #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • Aadit Kapoor

    MemberNov 22, 2013

    Can any one tell me what is hardware engineering?
    Are you sure? This action cannot be undone.
    Cancel
  • Alok mishra

    MemberNov 23, 2013

    Aadit Kapoor
    Can any one tell me what is hardware engineering?
    hardware engineering is mainly concerned with the establishment ,look after and maintenance of computer networks but also put focus on other hardware related issues related to power supply , computer components and peripherals etc .
    Are you sure? This action cannot be undone.
    Cancel
  • Aadit Kapoor

    MemberNov 23, 2013

    How to get started in hardware engineering?
    Are you sure? This action cannot be undone.
    Cancel
  • Abhishek Rawal

    MemberNov 23, 2013

    Aadit Kapoor
    Can any one tell me what is hardware engineering?
    Are you interested in maintaining hardware ? Something like 'troubleshooter' for computer hardwares ?
    Or you're rather interested in 'developing' hardware & communicating hardware using programming languages ?

    Note that both are very different domain & in my opinion, latter one is rather very much interesting than the other one.
    Are you sure? This action cannot be undone.
    Cancel
  • Aadit Kapoor

    MemberNov 23, 2013

    Abhishek Rawal
    Are you interested in maintaining hardware ? Something like 'troubleshooter' for computer hardwares ?
    Or you're rather interested in 'developing' hardware & communicating hardware using programming languages ?

    Note that both are very different domain & in my opinion, latter one is rather very much interesting than the other one.
    I am interested in developing hardware & communicating hardware using programming languages.
    How do i get started in this?
    Are you sure? This action cannot be undone.
    Cancel
  • Aadit Kapoor

    MemberNov 23, 2013

    I am currently learning C and Data structures.
    Are you sure? This action cannot be undone.
    Cancel
  • Abhishek Rawal

    MemberNov 23, 2013

    Learning programming languages is good & C is obviously good start. But don't start picking up languages one after another like all others do,stick with C/Embedded C.(Python & Vala is fun language too,just saying).Also avoid learning languages like Java or C++ for now.Learning these languages won't do anything wrong, but remember that you're dealing with hardware so it is better to consume time in learning & understanding basics of electronics & understanding hardware first, you can pick on other languages later.

    I am not in position in giving suggestions,as I am too a student myself & trying to march towards Embedded linux. But I can ask you to do same what I did :
    Understand Basics of electronics, Learn Digital logic design, Start learning 8086/80386 & Intel-51 family.
    Read Assembly language step-by-step Programming with Linux by Duntemann,awesome book!
    Fun part starts now,Buy arduino,RPi & start creating something.(I am in this phase now)

    What next ? well I don't know too, But I am planning to learn RTOS, Linux Kernel,GNU toolchain & ARM.
    Are you sure? This action cannot be undone.
    Cancel
  • najeeb88

    MemberJan 24, 2014

    najeeb88
    Thank so much for sharing your thought with your readers.
    Informative post.....
    Are you sure? This action cannot be undone.
    Cancel
  • Aadit Kapoor

    MemberJan 25, 2014

    Alok mishra
    yes thats what i know but a statement in a book confused me .it(the book) was saying that pointer variables are 2 byte wide in DOS and 4 byte wide in windows/linux.
    One more thing,pointers were introduced by operating system vendors,that is why it comes 2 and 4 in dos and windows respectively.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register