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
How can you invoke another program from within a C program?
Can a program have two main functions?
How can you pass an array to a function by value?
What does the format %10.2 mean when included in a printf statement?
How can you increase the size of a statically allocated array?
Are enumerations really portable?
What is derived datatype in c?
What is ambagious result in C? explain with an example.
Write a progarm to find the length of string using switch case?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
formula to convert 2500mmh2o into m3/hr
Explain about C function prototype?
write an algorithm to display a square matrix.
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
Explain 'bit masking'?