Write a C Programm..
we press 'a' , it shows the albhabetical number is 1, if we
press 'g' it shows the answer 7.. any can help me
Answer Posted / vaibhav srivastava
#include<stdio.h>
int main()
{
char c;
int i;
printf("Enter any char\t");
scanf("%c",&c);
if ( c>=65 && c<=92)
printf("%d\n",c-64);
else if( c>=97 && c<=122)
printf("%d\n",c-96);
else
printf("\n\nWrong Input\n\n");
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Can i use “int” data type to store the value 32768? Why?
What is the difference between Printf(..) and sprint(...) ?
Can you write the algorithm for Queue?
why wipro wase
What is c language and why we use it?
Can 'this' pointer by used in the constructor?
Is c is a middle level language?
What is scanf_s in c?
How can a string be converted to a number?
What is data structure in c language?
Why is extern used in c?
Explain About fork()?
what is the basis for selection of arrays or pointers as data structure in a program
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
How to write a code for reverse of string without using string functions?