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
What is the difference between the = symbol and == symbol?
What is an operator?
Are global variables static in c?
What is enumerated data type in c?
What does %d do?
What are 3 types of structures?
What is c system32 taskhostw exe?
What is meant by initialization and how we initialize a variable?
What is a MAC Address?
Does c have an equivalent to pascals with statement?
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
Explain what math functions are available for integers? For floating point?
What is the process of writing the null pointer?
What is bin sh c?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include