Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Explain what is the stack?

1041


Are the outer parentheses in return statements really optional?

1049


Why shouldn’t I start variable names with underscores?

1006


Explain that why C is procedural?

1081


What is #include cctype?

1075


Simplify the program segment if X = B then C ← true else C ← false

2959


What type is sizeof?

995


Write a program to print "hello world" without using a semicolon?

1003


Why do we use & in c?

949


What is a nested loop?

1071


What is the size of array float a(10)?

1091


What is use of null pointer in c?

958


Why do we need arrays in c?

1083


In C language what is a 'dangling pointer'?

1062


What is the c language function prototype?

1041