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

typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

0 Answers  


Explain what is operator promotion?

0 Answers  


how to convert an char array to decimal array

4 Answers  


Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }

7 Answers   TCS,


write a program that will print %d in the output screen??

9 Answers   Infosys,


The program to allow the characters from the input received and send this function to a function check if the characters between letters a to z is a function of y joins as the characters main and output to otherwise return to the original function of the y characters

0 Answers  


What is assert and when would I use it?

0 Answers  


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

0 Answers  


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

8 Answers   Aspire,


How do I copy files?

0 Answers  


What is the difference between calloc() and realloc()?

1 Answers  


how to introdu5ce my self in serco

0 Answers  


Categories