Learn with Anil · TGPSC HMWSSB Manager (Engineering) PYQsPractise online →Subscribe ₹149

TGPSC HMWSSB Manager 2015 Paper 2 CSE · Question 115

Question 115 of the TSPSC Manager (Engineering), HMWSSB, 2015: Paper 2 (Computer Science & Information Technology) (1 November 2015). Try it first, then open the answer. The explanation is in the practice app with the All-in-One Pass.

  1. Manager 2015 Paper 2 (CS & IT) · Q115 · Programming in C, C++ & Java · C Programming

    Consider the following C program

    int x;
    main()
    {
        int x=0;
        {
            int x=10;
            x++;
            change_x(x);
            x++;
            modify_x();
            printf("%d ",x);
        }
        x++;
        change_x(x);
        printf("%d ",x);
        modify_x();
        printf("%d\n",x);
    }
    modify_x()
    {
        return (x+=10);
    }
    change_x()
    {
        return(x+=1);
    }

    What would be the output of the above program?

    1. 23 14 24
    2. 23 1 1
    3. 13 1 1
    4. 12 1 1
    Show answer

    Answer: (4) 12 1 1

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

Answer it in the practice appMake a topic-wise quiz