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       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
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 RREVERS OF A GIVEN DIGIT NUMBER IF IT 
IS INPUT THROUGH THE KEYBORD BY USING C LANGUAGE
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: HOW TO FIND OUT THE RREVERS OF A GIVEN DIGIT NUMBER IF IT IS INPUT THROUGH THE KEYBORD BY USING C LANGUAGE
Answer
# 1
#include<stdio.h>
void main()
{
int n;
printf("enter any number");
scanf("%d",&n);
while(n>0)
{
a=n%10;
n=n/10;
pritnf("%d",a);
}
getch();
}
 
Is This Answer Correct ?    2 Yes 1 No
Yogita
 
  Re: HOW TO FIND OUT THE RREVERS OF A GIVEN DIGIT NUMBER IF IT IS INPUT THROUGH THE KEYBORD BY USING C LANGUAGE
Answer
# 2
#include<stdio.h>
#include<conio.h>
long int num,result=0,i;
void main()
{
 clrscr();
printf("\nenter the number to be reversed=");
scanf("%ld",&num);
while(num>0)
{
 i=num%10;
 num=num/10;
 result=result*10+i;
}
printf("\nReversed number is=%ld",result);
getch();
}
 
Is This Answer Correct ?    2 Yes 0 No
Prof.gagandeep Jagdev
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
class foo { public: static int func(const char*& p) const; }; This is illegal, why? Google6
What's the difference between calloc() and malloc()?  3
f=(x>y)?x:y a) f points to max of x and y b) f points to min of x and y c)error HCL4
WHY DO WE USE A TERMINATOR IN C LANGUAGE?  2
what is the output of the following program and explain the answer #include<stdio.h> exp() { main(5) } main(int a) { printf("%d",a); return; } Satyam3
can we print any string in c language without using semicolon(;)(terminator) in whole program.  6
how to find that no is int or float?  5
define function Assurgent4
Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above Accenture3
write a function which accept two numbers from main() and interchange them using pointers?  3
To what value do nonglobal variables default? 1) auto 2) register 3) static  4
Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack  3
Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... } TCS4
what are the difference between ANSI C and Let Us c and Turbo C LG-Soft1
please give me some tips for the selection in TCS. TCS3
1,1,5,17,61,217,?,?.  3
Here is alphabets : abcdefgh 1) how to reverse. as hgfedcba 2) after reversal, how to group them in a pair hg fe dc ba.  2
What is the Difference between Macro and ordinary definition? Motorola2
what is the difference between malloc() and calloc() function?  1
what is the difference between arrays and linked list Tech-Mahindra15
 
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