wap in c to accept a number display the total count of digit
Answer Posted / vaibhav
#include<stdio.h>
#include<conio.h>
void main()
{
int no,t,cnt=0;
clrscr();
printf("\n enter the no.");
scanf("%d",&no);
while(no!=0)
{
t=no%10;
no=no/10;
cnt++;
}
printf("\nTotal count of digit is%d",cnt);
getch();
}
| Is This Answer Correct ? | 19 Yes | 4 No |
Post New Answer View All Answers
What is structure in c explain with example?
Explain how can a program be made to print the line number where an error occurs?
Are the variables argc and argv are local to main?
What do you mean by Recursion Function?
What is the 'named constructor idiom'?
What is the use of sizeof?
What does typeof return in c?
Here is a neat trick for checking whether two strings are equal
What are categories used for in c?
What is a lvalue
What are header files why are they important?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What's the total generic pointer type?
What is sizeof array in c?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)