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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What functions are in conio h?

652


Which control loop is recommended if you have to execute set of statements for fixed number of times?

805


What is the difference between arrays and pointers?

629


What is nested structure in c?

604


string reverse using recursion

1805






can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

1402


Difference between linking and loading?

686


Explain the properties of union.

607


Explain what is wrong with this statement? Myname = ?robin?;

992


Differentiate between the expression “++a” and “a++”?

697


How do I determine whether a character is numeric, alphabetic, and so on?

620


What is the description for syntax errors?

610


What is the difference between procedural and functional programming?

515


how do you execute a c program in unix.

634


What is pragma in c?

623