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 / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
char s;
printf("enter the character :");
scanf("%d",&s);
printf("\n here CAPITAL and SMALL letters are taken as same\n");
if(s>='A'&&s<='Z')
printf("\nthis is the %dth alphabet from first",s-'A');
else if(s>='a'&&s<='z')
printf("\nthis is the %dth alphabet from first",s-'a');
else
printf("\n INVALID ALPHABET");
getch();
}
thank u
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is advantage of pointer in c?
Why doesnt the call scanf work?
Tell us bitwise shift operators?
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values
Explain how can I right-justify a string?
Explain what is operator promotion?
Here is a neat trick for checking whether two strings are equal
What is a header file?
List out few of the applications that make use of Multilinked Structures?
How will you find a duplicate number in a array without negating the nos ?
Are the variables argc and argv are always local to main?
What do you understand by friend-functions? How are they used?
How can variables be characterized?
Explain the ternary tree?
Define Spanning-Tree Protocol (STP)