if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND
CORRESPONDING VALUE FROM ASCII TABLE
Answer Posted / vignesh1988i
since it is given as digits, lets assume that we take only
integers.
#include<stdio.h>
#include<conio.h>
void main()
{
int n,a[20],count=0;
printf("enter th number :");
scanf("%d",&n);
for(int i=0;n>0;i++)
{
a[i]=n%10;
n=n/10;
count++;
}
for(i=0;i<count;i++)
{
printf("%c",a[i]);
}
getch();
}
this will be the logic , i think so.....!
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Linked lists -- can you tell me how to check whether a linked list is circular?
What is the difference between volatile and const volatile?
What will the preprocessor do for a program?
how can I convert a string to a number?
Why can’t constant values be used to define an array’s initial size?
What are called c variables?
Why n++ execute faster than n+1 ?
Combinations of fibanocci prime series
What is the stack in c?
How can I implement sets or arrays of bits?
Can a pointer be volatile in c?
Write the syntax and purpose of a switch statement in C.
How can I read/write structures from/to data files?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
What are the advantages of using macro in c language?