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
Explain a file operation in C with an example.
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
What is a void pointer? When is a void pointer used?
diff between exptected result and requirement?
Do character constants represent numerical values?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
Differentiate between static and dynamic modeling.
Explain zero based addressing.
What is nested structure in c?
What is the size of structure in c?
What is property type c?
Differentiate between #include<...> and #include '...'
what are the advantages of a macro over a function?
Is c is a middle level language?
What are types of preprocessor in c?