Answered Questions

  • Output of a++ + ++a + a++

    What is the answer of a++ + ++a + a++ int a=5;c = a++ + ++a + a++;//compiler produces the answer 28!!!//How

    vishal

    • Jun 2nd, 2022

    19 is the correct answer here is my perfect code try and find it all other answers is incorrect

    Code
    1. #include <stdio.h>
    2.  
    3. int main()
    4. {
    5. int a=5;int c;
    6.  
    7. c = a++ + ++a + a++;
    8.  printf("%d",c);
    9. }
    10.  

    susruth

    • Sep 25th, 2019

    Code
    1. #include<stdio.h>
    2. int main()
    3. {
    4. int a=5;
    5. int k= --a + a--;
    6. printf("k= %d   a=%d
    7. ".k,a);
    8. return 0;
    9. }