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 Basic concepts of C language?

1171


c program to compute AREA under integral

2414


In c language can we compile a program without main() function?

1145


How can I do serial ("comm") port I/O?

1191


What do you mean by Recursion Function?

1134


Is null equal to 0 in sql?

1160


Write the syntax and purpose of a switch statement in C.

1115


What are the different types of constants?

1083


What is the acronym for ansi?

1057


What is fflush() function?

1141


What is the maximum length of an identifier?

1195


How can I determine whether a machines byte order is big-endian or little-endian?

1069


why return type of main is not necessary in linux

2115


What is the use of bitwise operator?

1138


Explain how to reverse singly link list.

1156