Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Answers were Sorted based on User's Feedback



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

Answer / vaibhav

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

Is This Answer Correct ?    2 Yes 2 No

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

Answer / eranna

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

}

Is This Answer Correct ?    0 Yes 0 No

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

Answer / 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

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

Answer / vignesh1988i

sorry ... i could not understand ur question
properly....... can you post it again.... if
possible!!!!!!!!!!!!please

Is This Answer Correct ?    0 Yes 1 No

Post New Answer



More C Interview Questions

What is the value of y in the following code? x=7;y=0; if(x=6) y=7; else y=1;

12 Answers   TCS,


What is putchar() function?

0 Answers  


What is difference between array and pointer in c?

0 Answers  


my name is nani i completed my b-tech in hyd now i want go for interveiw but i dont know the process of software field interveiws plz help me anyone how many rouds there n what rounds plz plz plz help me n where i can get these details

2 Answers  


main() { int a[10]; printf("%d",*a+1-*a+3); }

2 Answers  






What is use of integral promotions in c?

0 Answers  


Should a function contain a return statement if it does not return a value?

0 Answers  


Explain how can I prevent another program from modifying part of a file that I am modifying?

0 Answers  


Why & is used in scanf in c?

0 Answers  


how should functions be apportioned among source files?

0 Answers  


What is the purpose of clrscr () printf () and getch ()?

0 Answers  


print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20

8 Answers   TCS,






Categories