simple c program for 12345 convert 54321 with out using string

Answer Posted / rajan sonvane

#include<stdio.h>
#include<conio.h>
main()
{
int *p,a[5]={1,2,3,4,5},b[5],i=0;
p=a;
while(i<5)
{

b[i]=*(p+4-i);

i++;
}
for(i=0; i<5; i++)
{
printf("%d",b[i]);
}
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is .obj file in c?

646


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

2789


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

632


What are the different categories of functions in c?

641


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

1909






What are the data types present in c?

623


Why do we use c for the speed of light?

603


How does normalization of huge pointer works?

629


how to create duplicate link list using C???

2071


Write a program to print fibonacci series using recursion?

581


What is the time and space complexities of merge sort and when is it preferred over quick sort?

673


What is an endless loop?

796


What is the explanation for prototype function in c?

564


Explain how can I avoid the abort, retry, fail messages?

587


What is the condition that is applied with ?: Operator?

656