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...

Print all numbers which has a certain digit in a certain
position
eg:
number=45687
1 number=4
2 number=5
etc

Answer Posted / eranna kybarshi

#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,t,cnt=0;
int num[10];
clrscr();
printf("\nEnter The No.");
scanf("%d",&n);
while(n%10!=0)
{
t=n%10;
num[cnt]=t;
n=n/10;
cnt++;
}
num[cnt]='\0';

for(i=cnt-1;i>-1;i--)
printf("\n %d number= %d",cnt-i,num[i]);
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1093


What is the scope of global variable in c?

1039


how to find binary of number?

4543


a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

1120


Explain which function in c can be used to append a string to another string?

1141


What is variable and explain rules to declare variable in c?

1181


Give me the code of in-order recursive and non-recursive.

1423


Explain the properties of union.

1137


What is the equivalent code of the following statement in WHILE LOOP format?

1349


What are different storage class specifiers in c?

1139


What do mean by network ?

1219


What are the benefits of c language?

1228


What is typedef?

1512


What are pointers? What are stacks and queues?

1222


What is sorting in c plus plus?

1028