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 |
how to TOGGLE Nth bit of variable in a MACRO
what is linkage error when it occurs in c program
What is preprocessor with example?
What are external variables in c?
what is the purpose of the following code, and is there any problem with the code? void fn(long* p1, long* p2) { register int x = *p1; register int y = *p2; x ^= y; y ^= x; x ^= y; *p1 = x; *p2 = y; }
Do character constants represent numerical values?
#include main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }
. Explain the differences between fork() and exec() in C
write a program to search for an element in a given array. If the array was found then display its position otherwise display appropriate message in c language
how can f be used for both float and double arguments in printf? Are not they different types?
What are the advantages of Macro over function?
main() { char x; while(x=0;x<=255;x++) printf("\nAscii value %d Charater %c",x,x); }