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
Is there any possibility to create customized header file with c programming language?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
Is it possible to have a function as a parameter in another function?
What are the two forms of #include directive?
Why header file is used in c?
Can we initialize extern variable in c?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What are loops in c?
What is sizeof return in c?
What is structure of c program?
Why cant I open a file by its explicit path?
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
How are strings stored in c?
What is abstract data structure in c?