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
differentiate built-in functions and user – defined functions.
Explain is it better to bitshift a value than to multiply by 2?
What is the stack in c?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
Why we use int main and void main?
What is the use of typedef in c?
Explain spaghetti programming?
Can the curly brackets { } be used to enclose a single line of code?
Describe the header file and its usage in c programming?
What is switch in c?
Differentiate call by value and call by reference?
What is the use of define in c?
What is pragma in c?
What does %p mean c?
What is the need of structure in c?