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                      
tip   SiteMap shows list of All Categories in this site.
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
how to find out the reverse number of a digit if it is 
input through the keyboard?
 Question Submitted By :: Shrikant
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to find out the reverse number of a digit if it is input through the keyboard?
Answer
# 1
A SMALL IM IMPLEMENTATION OF POINTERS.

#include<stdio.h>
#include<conio.h>
void main()
{
int n,*k,l;
printf("enter the number :");
scanf("%d",&n);
k=&n;
for(int i=1;*k>0;i++)
{
l=(*k)%10;
*k=(*k)/10;
printf("%d",l);
}
getch();
}
 
Is This Answer Correct ?    3 Yes 0 No
Vignesh1988i
 
  Re: how to find out the reverse number of a digit if it is input through the keyboard?
Answer
# 2
int main()
{
	int a = 5678;
	int temp=0,rev;

	while((a%10)!=0)
	{
		rev =a%10;
		a=a/10;
		temp= temp*10+ rev;
	}
return 0;
}
 
Is This Answer Correct ?    1 Yes 0 No
Amrit
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
write a program for even numbers?  8
without a terminator how can we print a message in a printf () function. NIIT5
Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don't use printf statements;use two nested loops instead. you will have to use braces around the body of the outer loop if it contains multiple statements.  2
What is the difference between typeof(foo) and myFoo.GetType()?  1
what does the following function print? func(int i) { if(i%2)return 0; eale return 1; } main() { int =3; i=func(i); i=func(i); printf("%d",i);} TCS8
what is the use of call back function in c?tell me with example  1
what is the output of following question? void main() { int i=0,a[3]; a[i]=i++; printf("%d",a[i] }  2
How would you sort a linked list?  1
Given an array of length N containing integers between 1 and N, determine if it contains any duplicates. SilverKey2
1 232 34543 4567654 can anyone tell me how to slove this c question  3
Tell us the difference between these two : #include"stdio.h" #include<stdio.h> define in detial.  4
What ios diff. Between %e & %f? Honeywell1
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
int a=2,b=3,c=4; printf("a=%d,b=%d\n",a,b,c); what is the o/p? Verifone6
Write a C Programm.. we press 'a' , it shows the albhabetical number is 1, if we press 'g' it shows the answer 7.. any can help me  4
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; } NDS3
What are .h files and what should I put in them?  3
Find the middle node in the linked list?? (Note:Do not use for loop, count and count/2) Subex2
Write a routine that prints out a 2-D array in spiral order! Lucent1
f() { int a=2; f1(a++); } f1(int c) { printf("%d", c); } c=? Geometric-Software2
 
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