Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?

    int main()
    {
    int i = 11;
    int *p = &i;
    foo(&p);
    printf("%d ", *p);
    }
    void foo(int *const *p)
    {
    int j = 10;
    *p = &j;
    printf("%d ", **p);
    }
  2. A.
    Compile time error
    B.
    10   10
    C.
    Undefined behaviour
    D.
    10   11

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    None.


Be The First To Comment