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

What are variables c?

998


What is structure of c program?

1079


Explain the difference between exit() and _exit() function?

1109


What is pragma in c?

1130


Why c is called a mid level programming language?

1023


Is fortran still used in 2018?

986


What is difference between function overloading and operator overloading?

1046


Explain the use of fflush() function?

1025


How is null defined in c?

1102


Explain how do you search data in a data file using random access method?

1070


When should a type cast not be used?

1005


What is gets() function?

1074


Do you have any idea about the use of "auto" keyword?

1050


is it possible to create your own header files?

1046


Are the expressions * ptr ++ and ++ * ptr same?

1088