Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Where is volatile variable stored?

1068


Explain zero based addressing.

1005


show how link list can be used to repersent the following polynomial i) 5x+2

2274


What is a pointer variable in c language?

1083


Which programming language is best for getting job 2020?

1038


What is c language in simple words?

1052


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

1131


Difference between malloc() and calloc() function?

1186


Explain can the sizeof operator be used to tell the size of an array passed to a function?

1057


How can you allocate arrays or structures bigger than 64K?

1119


Can a variable be both static and volatile in c?

1018


Write a program to check whether a number is prime or not using c?

1039


What is register variable in c language?

1017


What is the hardest programming language?

1130


Is using exit() the same as using return?

1319