if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND
CORRESPONDING VALUE FROM ASCII TABLE



if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND CORRESPONDING VALUE FROM ASCII TABLE..

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

More C Interview Questions

write a program to find out prime number using sieve case?

0 Answers   HCL,


what is difference between ANSI structure and C99 Structure?

1 Answers   Wipro,


Is using exit() the same as using return?

0 Answers  


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

0 Answers  


Can i use “int” data type to store the value 32768? Why?

0 Answers  






Explain the difference between malloc() and calloc() in c?

0 Answers  


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

0 Answers   IBM,


i want to have a program to read a string and print the frequency of each character and it should work in turbo c

3 Answers   Persistent, Wipro,


Explain what are multidimensional arrays?

0 Answers  


What should not contain a header file?

2 Answers  


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

0 Answers  


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

0 Answers  


Categories