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

process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

1887


What is far pointer in c?

804


a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

648


What are the 4 data types?

592


explain what are pointers?

615






Lists the benefits of c programming language?

590


write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...

1481


How to Throw some light on the splay trees?

617


What is the difference between #include and #include 'file' ?

602


What is the concatenation operator?

606


formula to convert 2500mmh2o into m3/hr

491


What are the 5 elements of structure?

560


Which is the best website to learn c programming?

576


Sir i need notes for structure,functions,pointers in c language can you help me please

1941


What is #error and use of it?

675