🎴 Flashcard Mode

Data Types, Variables and Storage Classes

Card1 / 17
Mastered0
Review0
QuestionClick to flip

What will be the output of the following set of codes after execution?
void main()
{
printf(“%d %d %d ”,56,056,0x56);
}

AnswerClick to flip back
A
56 46 86
💡 Explanation:

%d specifier display the output in decimal number system. 56 is the decimal number, 056 is the octal number equivalent to 46 in decimal, 0x56 is the hexadecimal number equivalent to 86 in decimal. So, the output will be 56 46 86.

Change Mode