write a program to display reverse of a number using for
loop?
Answer Posted / rakesh ranjan
#include<conio.h>
#include<stdio.h>
main()
{
int x,n,i;
printf("entre the number");
scanf("%d",&n);
for(;n>0;)
{
x=n%10;
printf("%d",x);
n/=10;
}
getch();
}
Is This Answer Correct ? | 15 Yes | 9 No |
Post New Answer View All Answers
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
What is the 'named constructor idiom'?
Write a program to find factorial of a number using recursive function.
Why can arithmetic operations not be performed on void pointers?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
Explain how does flowchart help in writing a program?
Explain what is the benefit of using const for declaring constants?
Is c procedural or object oriented?
How is = symbol different from == symbol in c programming?
What is the use of bitwise operator?
What is void main () in c?
How do you sort filenames in a directory?