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
What the different types of arrays in c?
What is the difference between āgā and āgā in C?
Write a function that will take in a phone number and output all possible alphabetical combinations
Where are local variables stored in c?
What is signed and unsigned?
What is the size of empty structure in c?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
What are header files? What are their uses?
What do you mean by Recursion Function?
hi send me sample aptitude papers of cts?
what is the difference between class and unio?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
How can a number be converted to a string?
Explain what will the preprocessor do for a program?
What are different types of pointers?