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 do you mean by dynamic memory allocation in c? What functions are used?
Tell us two differences between new () and malloc ()?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
What is a example of a variable?
pierrot's divisor program using c or c++ code
What are header files in c?
What is structure padding and packing in c?
What is LINKED LIST? How can you access the last element in a linked list?
write a c program for swapping two strings using pointer
Write a program to reverse a linked list in c.
Are the outer parentheses in return statements really optional?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
What are the 5 data types?
How do I determine whether a character is numeric, alphabetic, and so on?
What is a 'null pointer assignment' error?