#include<stdio.h>
main()
{
int a=1;
int b=0;
b=++a + ++a;
printf("%d %d",a,b);
}

Answer Posted / banavathvishnu

let consider the statement
b = ++a + ++a;
++a will be 2
++a again will be 3
now replace its value in the expression
b = a + a = 3+3=6
hence a is 3 and b is 6

Is This Answer Correct ?    26 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we replace the struct function in tree syntax with a union?

774


What are the disadvantages of external storage class?

584


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

1839


Give differences between - new and malloc() , delete and free() ?

605


what are enumerations in C

720






What is sizeof int?

629


Give the rules for variable declaration?

669


Do you know pointer in c?

582


What is string length in c?

605


What are conditional operators in C?

619


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

1584


Why do we use c for the speed of light?

603


How pointers are declared?

557


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

3728


What are loops in c?

545