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...

what is the output of the following code?
main()
{
int I;
I=0x10+010+10;
printf("x=%x",I);
}
give detailed reason

Answer Posted / yogesh bansal

Output of this program is 22
reason is :
0x10 is hexadecimal value which is equal to 16 in decimal.
010 is octal value which is equal to 8 in decimal
10 is decimal value

so total is 16+8+10= 34

I value is 34.
Now we are printing the value of I on hexadecimal using %x
34 is equal to 0x22 in hexadecimal.

so the output is 22 in hexadecimal

Hope its is clear to you

Is This Answer Correct ?    70 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain low-order bytes.

1098


write a program in c language to print your bio-data on the screen by using functions.

6840


What is d scanf?

1141


Subtract Two Number Without Using Subtraction Operator

907


What do you mean by keywords in c?

1202


What is ambagious result in C? explain with an example.

2700


What is a memory leak? How to avoid it?

1425


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

1207


Are global variables static in c?

1218


Explain the use of 'auto' keyword

1171


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

8121


Explain how can I prevent another program from modifying part of a file that I am modifying?

1142


Explain what math functions are available for integers? For floating point?

1161


Can a local variable be volatile in c?

1056


Write program to remove duplicate in an array?

1131