Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / vijay r15

ans 3 6

Let me explain
First a=1&b=0
b=++a + ++a;

The operation will be as
b= ++1 + ++a
=2 + ++a
=2 + ++2
=2 + 3=a+a now a=3
Remember here is the trick
Now b= a + a
I.e b=3+3=6

Got it

Vijay r15
For any clarification mail to
raj.vijay55@gmail.com

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between memcpy and memmove?

969


What is linear search?

1091


Differentiate between ordinary variable and pointer in c.

1103


What is clrscr ()?

1059


What do you mean by command line argument?

1101


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1971


Explain bit masking in c?

1085


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2776


I heard that you have to include stdio.h before calling printf. Why?

1010


largest Of three Number using without if condition?

1532


How do you define structure?

996


Why is c called a structured programming language?

1216


What is pointer & why it is used?

1063


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

16593


what is the format specifier for printing a pointer value?

974