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
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
What is far pointer in c?
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
What are the 4 data types?
explain what are pointers?
Lists the benefits of c programming language?
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...
How to Throw some light on the splay trees?
What is the difference between #include and #include 'file' ?
What is the concatenation operator?
formula to convert 2500mmh2o into m3/hr
What are the 5 elements of structure?
Which is the best website to learn c programming?
Sir i need notes for structure,functions,pointers in c language can you help me please
What is #error and use of it?