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 the difference between array and linked list in c?
How does placing some code lines between the comment symbol help in debugging the code?
Write a program with dynamically allocation of variable.
How can you convert integers to binary or hexadecimal?
What is array in c with example?
Can we replace the struct function in tree syntax with a union?
write a c program in such a way that if we enter the today date the output should be next day's date.
What is structure in c language?
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
What does *p++ do? What does it point to?
What is default value of global variable in c?
What are the 32 keywords in c?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
write a progrmm in c language take user interface generate table using for loop?
What is register variable in c language?