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 local and global variable in c?
Why are algorithms important in c program?
List some of the dynamic data structures in C?
Can we assign integer value to char in c?
Explain how do you use a pointer to a function?
Explain 'bit masking'?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
what is bit rate & baud rate? plz give wave forms
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
How macro execution is faster than function ?
How important is structure in life?
What should malloc() do?
What is the use of header files?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
Can we change the value of constant variable in c?