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 / kartik

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.

Note:The person above me has given the corrst infm however the output is 34.
Try and run the program in C Compiler

Is This Answer Correct ?    12 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the expression “++a” and “a++”?

1275


Explain what is a program flowchart and explain how does it help in writing a program?

1143


How can I access an I o board directly?

1130


What is meant by type specifiers?

1188


What is meant by recursion?

1100


Explain what are run-time errors?

1145


What is the difference between array and pointer?

1085


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

1237


What is include directive in c?

1209


What are the different properties of variable number of arguments?

1204


List some applications of c programming language?

1000


Why is sprintf unsafe?

1132


Where are c variables stored in memory?

1136


what are enumerations in C

1218


What is the scope of static variable in c?

1083