ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
WRITE A PROGRAM TO FIND A REVERSE OF TWO NO
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: WRITE A PROGRAM TO FIND A REVERSE OF TWO NO
Answer
# 1
#include<stdio.h>
#include<conio.h>
void main();
int a;
clrscr();
float rem=0,rev=0;
while(rev>=0)
{
rem=a%10;
rev=rev+rem;
a=a/10;
}
printf(Reverse of two digit no is:=%d",rev);
getch();
}
 
Is This Answer Correct ?    6 Yes 2 No
Ashok
 
  Re: WRITE A PROGRAM TO FIND A REVERSE OF TWO NO
Answer
# 2
#include<stdio.h>
#include<conio.h>
void main()
{
      clrscr();
      int a;
      float rem=0,rev=0; 
      while(rev>=0)
           {
                 rem=a%10;
                 rev=rev*10+rem;
                 a=a/10;
             }
       printf(Reverse of two digit no is:=%d",rev);
getch();
}
 
Is This Answer Correct ?    1 Yes 1 No
Bhavesh Kashikar
 
 
 
  Re: WRITE A PROGRAM TO FIND A REVERSE OF TWO NO
Answer
# 3
#include<stdio.h>
#include<conio.h>
main()
{
      int a, b,c,d;
      printf("Enter a value:");
      scanf("%d", &a);
      if (a%10==0)
         {b=a/10;
         printf("Reverse value is:%0d", b);}
      else
          {c=a%10;
          d=(a/10)+(c*10);
          printf("Reverse value is:%d", d);}
getch();
}
 
Is This Answer Correct ?    3 Yes 0 No
Ajay
 
  Re: WRITE A PROGRAM TO FIND A REVERSE OF TWO NO
Answer
# 4
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("\nEnter Two no. ");
scanf("%d%d",&a,&b);
printf("\nBefore Reverse %d%d",a,b);
printf("\nAfter Reverse %d%d",b,a);
getch();
}
 
Is This Answer Correct ?    0 Yes 0 No
Priya
 
  Re: WRITE A PROGRAM TO FIND A REVERSE OF TWO NO
Answer
# 5
#include <stdio.h>
#include<conio.h>
void main()
{
 int n,t;
printf("\n enter the 2 digit no.");
scanf("%d",&n);
while(n%10>0)
{  
t=n%10;
  n=n/10;
printf("\n reverse no. is%d",t); 
} 
getch();
}
 
Is This Answer Correct ?    0 Yes 0 No
Vaibhav
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
what is the size of an integer variable?  1
what is the defrenece between structure and union  5
Difference between Class and Struct. Motorola6
how to find out the biggest element (or any other operation) in an array which is dynamic. User need not to mention the array size while executing.  2
Difference between null pointer and dangling pointer? Wipro3
main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); } wat is the o/p and how?  7
Print all the palindrome numbers.If a number is not palindrome make it one by attaching the reverse to it. eg:123 output:123321 (or) 12321  2
# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none TCS5
what is diff b/w huge & far & near pointer?? HCL1
What will be printed as the result of the operation below: #include<..> int x; int modifyvalue() { return(x+=10); } int changevalue(int x) { return(x+=1); } void main() { int x=10; x++; changevalue(x); x++; modifyvalue(); printf("First output:%d\n",x); x++; changevalue(x); printf("Second output:%d\n",x); modifyvalue(); printf("Third output:%d\n",x); }  2
Given an unsigned integer, find if the number is power of 2?  3
Write a program in c to input a 5 digit number and print it in words.  1
how to find a 5th bit is set in c program IBM3
Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list? Oracle1
main() { printf(5+"Vidyarthi Computers"); }  6
In scanf h is used for BFL2
here is a link to download Let_Us_C_-_Yashwant_Kanetkar  2
can you explain in brief what is "r+" mode in a file... i know that it si used to read and modify rhe existing content.... but explalanation about the file pointer in "r+" mode i wann to know??????????? Cognizent1
Is it possible to create recycle bin in mobiles?  2
Design a program using an array that lists even numbers and odd numbers separately from the 12 numbers supplied by a user.  7
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com