Home
TCS NQT
Programming
_C Program
_Command Line Args
_Pattern Problem
_Notes
_C MCQs
Placement Papers
_TCS
__TCS Ninja
__Coding Question
__Technical MCQ
__Interview Experience
_Persistant
_Capgemini
_AMCAT
_Youtube Videos
Interview Questions
_C Programming
_HR Questions
Sponsored Blog
About
Home
Count Number of digits
C program to count number of digits in a number
C program to count number of digits in a number
#include<stdio.h>
int main( )
{
int n, i=0;
printf("Enter the number");
scanf("%d",&n);
while(n>0)
{
n=n/10;
i++;
}
printf("Number of digits is %d",i);
return 0;
}
Post a Comment
0 Comments
Check Our Latest Video on YouTube
Like us on Facebook
Social Plugin
Total Pageviews
Popular Posts
Command Line argument In Turbo C
October 26, 2017
String Encoding | Goldman Sachs Coding Question 1 | Placement Papers
March 01, 2022
Capgemini Pseudo Code MCQs | Set - 1
May 30, 2019
Tags
Count Number of Words
Count Number of digits
Leap Year
Odd Even
Palindrome
Perfect Number
Prime Sum within range
Remove Consonants
Split Number into Digit
Square root of prime
Sum of Prime no
Sum of digits of number
Vowel into Uppercase
fibonacci within range
largest and smallest of an array
lower case to upper case
Recent in Recipes
Categories
Biggest among two
1
Binary To Decimal
1
Binary To Octal
1
Command Line argument In CodeBlocks
2
Count Number of digits
1
Decimal To Binary
1
Fahrenheit to Centigrade
1
GCD
2
HCF
2
Largest element of an array
1
Leap Year
1
Palindrome
4
Power of Number
1
Prime Sum within range
1
Square root of prime
1
Strong Number
1
Sum of Odd Number using scanf()
1
Sum of Prime no
2
Sum of digits of number
3
Swap two numbers
1
Variable and Datatypes
1
factorial
2
fibonacci within range
1
largest among N
1
largest among three
1
largest and smallest of an array
1
lower case to upper case
1
print number without using loops
1
to check Prime
1
without atoi()
1
0 Comments