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 are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
What is difference between union and structure in c?
Write a program in c to replace any vowel in a string with z?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
Explain pointer. What are function pointers in C?
What is a volatile keyword in c?
What are the data types present in c?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What are pointers? What are stacks and queues?
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......
What functions are in conio h?
What is #include cctype?
What are c header files?
Why c is known as a mother language?
When should you use a type cast?