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 a spanning Tree?
Why clrscr is used in c?
What is sizeof int?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
Explain what are run-time errors?
List some of the static data structures in C?
write a program to find out prime number using sieve case?
What is ambagious result in C? explain with an example.
What do you understand by friend-functions? How are they used?
What is the difference between printf and scanf in c?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
Can you pass an entire structure to functions?
difference between native and cross compilers
Why array is used in c?