C language interview questions solution for freshers beginners placement tricky good pointers answers explanation operators data types arrays structures functions recursion preprocessors looping file handling strings switch case if else printf advance linux objective mcq faq online written test prime numbers Armstrong Fibonacci series factorial palindrome code programs examples on c++ tutorials and pdf
Hexadecimal number questions with solutions in c program
(8) What will be output:
void main()
{
char a='\x82';
clrscr();
printf("%d",a);
getch();
}
Output:-126
Explanation: \x symbol indicate the hexadecimal number system in character constant. So 82 is hexadecimal number its equivalent binary value is 130. 130 is beyond the range of signed char. Since signed char is cyclic in nature so its value will be
130-256=-126
(For more detail visit the link data type)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment