main()
{
int a = 65;
printf(“%d %o %x”,a,a,a);
}

Output
65 101 41

Please explain me.How it is coming like that?

Answer Posted / ruchika thakur

in octal,divide 65 by 8 and collect the remainder.it will
return 101....and in hexadecimal,divide 65 by 16 and again
collect the remainder...you will get 41......



THANKS

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is operator precedence?

641


What is volatile variable in c with example?

581


What are the different categories of functions in c?

640


Can i use “int” data type to store the value 32768? Why?

754


write a program fibonacci series and palindrome program in c

630






What 'lex' does?

712


how to find anagram without using string functions using only loops in c programming

2712


What is meant by type casting?

622


What is the use of bit field?

635


What is a structure and why it is used?

617


What is the role of && operator in a program code?

564


How can I swap two values without using a temporary?

611


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.

4835


Is it better to use malloc() or calloc()?

645


why wipro wase

1823