Print all numbers which has a certain digit in a certain
position
eg:
number=45687
1 number=4
2 number=5
etc
Answer Posted / 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 |
Post New Answer View All Answers
Explain what are header files and explain what are its uses in c programming?
What is the purpose of 'register' keyword in c language?
What are the string functions? List some string functions available in c.
Explain what are multibyte characters?
What is the difference between char array and char pointer?
Explain how can type-insensitive macros be created?
Write a program to show the change in position of a cursor using c
How can you pass an array to a function by value?
What is the role of this pointer?
Can an array be an Ivalue?
Write a program to generate random numbers in c?
What is zero based addressing?
What is a shell structure examples?
Tell me with an example the self-referential structure?
Is it better to use a macro or a function?