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

Is there any possibility to create customized header file with c programming language?

1073


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1098


Is it possible to have a function as a parameter in another function?

1088


What are the two forms of #include directive?

1177


Why header file is used in c?

1103


Can we initialize extern variable in c?

1146


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

1075


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

1128


What are loops in c?

1018


What is sizeof return in c?

1047


What is structure of c program?

1173


Why cant I open a file by its explicit path?

1047


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

2147


How are strings stored in c?

1029


What is abstract data structure in c?

1060