Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is advantage of pointer in c?

1121


Why doesnt the call scanf work?

1137


Tell us bitwise shift operators?

1018


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

1643


Explain how can I right-justify a string?

988


Explain what is operator promotion?

1021


Here is a neat trick for checking whether two strings are equal

964


What is a header file?

1025


List out few of the applications that make use of Multilinked Structures?

2106


How will you find a duplicate number in a array without negating the nos ?

2080


Are the variables argc and argv are always local to main?

968


What do you understand by friend-functions? How are they used?

1154


How can variables be characterized?

2122


Explain the ternary tree?

961


Define Spanning-Tree Protocol (STP)

1068