Home / General Knowledge / Testing sawaal :: Discussion

Discussion :: Testing sawaal

  1. What will be output of following program ?

    #include
    int main()

    {

    int a = 10;
    void *p = &a;
    int *ptr = p;
    printf("%u",*ptr);
    return 0;

    }

  2. A.
    10
    B.
    Address
    C.
    2
    D.
    Compilation error

    View Answer

    Workspace

    Answer : Option A

    Explanation :


    Void pointer can hold address of any data type without type casting. Any pointer can hold void pointer without type casting.


Be The First To Comment