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
Where is volatile variable stored?
Explain zero based addressing.
show how link list can be used to repersent the following polynomial i) 5x+2
What is a pointer variable in c language?
Which programming language is best for getting job 2020?
What is c language in simple words?
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
Difference between malloc() and calloc() function?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
How can you allocate arrays or structures bigger than 64K?
Can a variable be both static and volatile in c?
Write a program to check whether a number is prime or not using c?
What is register variable in c language?
What is the hardest programming language?
Is using exit() the same as using return?