queries regarding address allocation

Discussion in 'C' started by sonika jha, Sep 1, 2016.

  1. sonika jha

    sonika jha New Member

    Joined:
    Sep 1, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Female
    taking the example of the following
    code snippet
    int marks;
    ...........
    scanf("%d",&marks);
    1-which statement allocates address
    and memory to the integer variable
    marks?
    2-does the aforementioned
    allocation assigns 5 consecutive
    addresses to each 5 characters of the
    variable?
    3-if so happens then how is the value
    being assigned to the variable,
    alloted the addresses possesed by
    the variable because the memory
    requirement of the assigned values
    could be >or< than that of the
    variable it is being assigned to.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice