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
Give the rules for variable declaration?
What do the functions atoi(), itoa() and gcvt() do?
Explain how can you be sure that a program follows the ansi c standard?
What are the general description for loop statement and available loop types in c?
How can I invoke another program or command and trap its output?
What are the different properties of variable number of arguments?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
What is wild pointer in c with example?
Who invented b language?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
What is the difference between declaring a variable by constant keyword and #define ing that variable?
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
What is %d used for?
How many bytes is a struct in c?
What is the process of writing the null pointer?