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
What is operator precedence?
What is volatile variable in c with example?
What are the different categories of functions in c?
Can i use “int” data type to store the value 32768? Why?
write a program fibonacci series and palindrome program in c
What 'lex' does?
how to find anagram without using string functions using only loops in c programming
What is meant by type casting?
What is the use of bit field?
What is a structure and why it is used?
What is the role of && operator in a program code?
How can I swap two values without using a temporary?
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.
Is it better to use malloc() or calloc()?
why wipro wase