This blog will cover all important aspects of 'C' 'C++', 'Data Structures in C' and other Technical stuffs. In this blog you will find good C Interview Questions Answers. I will be posting both multiple choice and subjective type C interview questions and answers. Tutorials will be posted from time to time that will focus on problem solving.
Friday, October 1, 2010
Code a program to convert decimal input into octal and hexadecimal formats. (with proper prefix for octal (0) and hexadecimal (0x)
int main()
{
int a;
printf("Enter a number:");
scanf("%d",&a);
printf("Octal equivelent of %d is %o\n",a,a);
printf("Hexadecimal equivelent of %d is %x\n",a,a);
No comments:
Post a Comment