Comment on the output of this C code? int main() { int i = 2; int i = i++ + i; printf("%d ", i); }

Question:
Comment on the output of this C code?

    int main()
    {
        int i = 2;
        int i = i++ + i;
        printf("%d
", i);
    }

1.= operator is not a sequence point

2.++ operator may return value with or without side effects

3. it can be evaluated as (i++)+i or i+(++i)

4.Both a and b

Posted Date:-2022-03-21 13:21:14


More MCQS Questions and answers

Search
Olete Team
Online Exam Test Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Test website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!