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

#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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Linked lists -- can you tell me how to check whether a linked list is circular?

627


What is indirection in c?

610


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

619


What is a function in c?

561


What is uint8 in c?

625






Explain that why C is procedural?

642


I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

544


How do you print an address?

718


What is else if ladder?

598


Explain the use of function toupper() with and example code?

636


Explain pointers in c programming?

620


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

1105


How can I manipulate individual bits?

594


What is the difference between printf and scanf )?

577


Explain the use of fflush() function?

609