Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

compute the output for following code snippets:

0 votes
asked Jun 12, 2019 by anonymous 1 flag
main()

{

printf("%d%d%d%d",72,072,0x72,0X72);

}

3 Answers

0 votes
answered Jun 14, 2019 by pavani kandukuri (180 points)
725811411400
commented Jun 19, 2019 by pavani
how it is 725811411400
0 votes
answered Jun 15, 2019 by SenthilKumarJ (140 points)
The answer is:

7258114114
0 votes
answered Aug 17, 2019 by Jongbo (460 points)
7258114114 the answer is this because they use binary number octadecimal and hexadecimal number. if the number start with 0 its octadecimal number and starting with 0x is hexadecimal. if it is octadecimal you usually times 8 to tenth digit and add the first digit to the result, in this case 072 you times 8 to 7 and it is 56 and add 2 to it because it still have 2 left after 7. so it becomes 58. and it goes same for the hexadecimal numbers too.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...