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

Answer Posted / anand

answer should be 3 5
b = 2 + 3
b = ++a + ++a
here the compiler will work as below

b = ++a + 2
thn
b = 3 + 2
thn
b = 5

Is This Answer Correct ?    9 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program which returns the first non repetitive character in the string?

599


what do you mean by enumeration constant?

596


Process by which one bit pattern in to another by bit wise operation is?

615


program to convert a integer to string in c language'

1984


What are qualifiers?

615






What is the difference between near, far and huge pointers?

628


Explain the use of bit fieild.

712


What are dangling pointers? How are dangling pointers different from memory leaks?

621


What is the value of uninitialized variable in c?

571


What are the two forms of #include directive?

643


Should I learn c before c++?

604


Why c is procedure oriented?

572


What are global variables and explain how do you declare them?

574


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

1492


write a program to find the given number is prime or not

3842