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?

Answers were Sorted based on User's Feedback



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

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

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

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

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

Answer / dhruv sharma rkdf

#include<stdio.h>
#include<conio.h>
void main(){
int n,temp,i=1;
clrscr();
printf("enter number:");
scanf("%d",&n);
for(;n>0;n=n/10){
temp=(n%10)*i;
i*=10;
printf("%d\n",temp)
}
getch();
}

Is This Answer Correct ?    1 Yes 0 No

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

Answer / cute_boy4434

PLz reply me soon . ya

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More C Interview Questions

Is c is a middle level language?

0 Answers  


Explain about the constants which help in debugging?

0 Answers  


Write a C program to check a number even or odd, without using any relational, arithmetic operator and any loops.

1 Answers  


Why cant I open a file by its explicit path?

0 Answers  


Is boolean a datatype in c?

0 Answers  


how to create c progarm without void main()?

1 Answers   NIIT,


44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?

6 Answers   Amdocs,


consagous technology placement paper

3 Answers   Consagous, Sypra,


1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

3 Answers  


Explain what does the format %10.2 mean when included in a printf statement?

0 Answers  


Why is C called a middle-level language?

1 Answers  


Write a program to show the change in position of a cursor using c

0 Answers  


Categories