simple c program for 12345 convert 54321 with out using string
Answer Posted / sharan
#include<stdio.h>
//#include<conio.h>
void main()
{
int n,m;
printf("enter the number :");
scanf("%d",&n);
while (n)
{
m=n%10;
n=n/10;
printf("%d",m);
}
printf("\n");
}
| Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
Difference between constant pointer and pointer to a constant.
What is return type in c?
write a proram to reverse the string using switch case?
What is meant by high-order and low-order bytes?
find out largest elemant of diagonalmatrix
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
Explain what is meant by 'bit masking'?
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
Why is #define used?
How will you write a code for accessing the length of an array without assigning it to another variable?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
What is a void pointer? When is a void pointer used?
Explain the meaning of keyword 'extern' in a function declaration.
When would you use a pointer to a function?