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...

If input is 123 then how to print 100 and 20 and 3 seperately?

Answer Posted / charusheela

#include<stdio.h>
#include<conio.h>
void main(){
int num=123,r,i=1;
clrscr();
while(num)
{
r=num%10;
printf("%d\n",r*i);
i*=10;
num/=10;
}
getch();
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What the different types of arrays in c?

1081


What is the difference between ā€˜g’ and ā€œgā€ in C?

4030


Write a function that will take in a phone number and output all possible alphabetical combinations

1064


Where are local variables stored in c?

1052


What is signed and unsigned?

1077


What is the size of empty structure in c?

1098


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

1265


What are header files? What are their uses?

1227


What do you mean by Recursion Function?

1134


hi send me sample aptitude papers of cts?

2178


what is the difference between class and unio?

2378


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

1032


How can a number be converted to a string?

1352


Explain what will the preprocessor do for a program?

1081


What are different types of pointers?

1085