Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?

    void foo(int*);
    int main()
    {
    int i = 10, *p = &i;
    foo(p++);
    }
    void foo(int *p)
    {
    printf("%d\n", *p);
    }
  2. A.
    10
    B.
    Some garbage value
    C.
    Compile time error
    D.
    Segmentation fault

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    None.


Be The First To Comment