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 / letskools

#include<stdio.h>
#include<conio.h>
void main()
{
int a[5];
int i, j,rem,k=0,x=1;
int num;
printf("enter any number");
scanf("%d",&num);
while(num>0)
{
rem = num % 10;
a[k] = rem * x;
x *= 10;
k++;
num /= 10;
}
for (i = k-1; i >= 0; i--)
{
printf("%d\n"a[i]);
}
getch();
}

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are disadvantages of C language.

1103


Why C language is a procedural language?

981


What is a macro in c preprocessor?

1056


What is the return type of sizeof?

1029


What does the && operator do in a program code?

1162


What are near, far and huge pointers?

1015


What are the advantages and disadvantages of c language?

965


Implement bit Array in C.

1097


Explain what is the difference between text files and binary files?

1100


Why can’t constant values be used to define an array’s initial size?

1328


In C language what is a 'dangling pointer'?

1065


How macro execution is faster than function ?

1134


When a c file is executed there are many files that are automatically opened what are they files?

1040


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

2005


Is null valid for pointers to functions?

1111