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

Explain what does it mean when a pointer is used in an if statement?

1044


What is difference between union and structure in c?

1138


What is dynamic memory allocation?

1320


Why c is called a middle level language?

1088


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

2006


Can you please explain the difference between syntax vs logical error?

1168


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

2166


Why we write conio h in c?

1012


what will be the output for the following main() { printf("hi" "hello"); }

10950


What are terms in math?

1031


What is scanf () in c?

1111


Why we use conio h in c?

1200


Why can’t we compare structures?

1254


What is the purpose of clrscr () printf () and getch ()?

1060


in linking some of os executables are linking name some of them

2110