Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?

    void main()
    {
    char *p = calloc(100, 1);
    p = "welcome";
    printf("%s\n", p);
    }
  2. A.
    Segmentation fault
    B.
    garbage
    C.
    Error
    D.
    welcome

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    None.


Be The First To Comment