Home » C Programming » Variables » Question
  1. Which part of the program address space is ptr stored in the following C code?
    #include <stdio.h>
    int *ptr = NULL;
    int main()
    {
    int n = 0;
    ptr = &n;
    return 0;
    }
    1. 0
    2. Code/text segment
    3. Data segment
    4. Bss segment
    5. Stack
Correct Option: C

Data segment



Your comments will be displayed only after manual approval.