Write a program to accept a character & display its
corrosponding ASCII value & vice versa?
Answer Posted / sanjay malik
#include<stdio.h>
main()
{
char ch;
printf("ENTER A CHARACTER: ");
scanf("%c",&ch);
printf("THE ASCII CODE IS %d",ch);}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is a structure member in c?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
What are pointers? Why are they used?
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What is difference between function overloading and operator overloading?
What are the types of data files?
Explain how do you convert strings to numbers in c?
Write a program that accept anumber in words
What is the difference between ++a and a++?
What is the general form of #line preprocessor?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
write a program to rearrange the array such way that all even elements should come first and next come odd
Explain what is the benefit of using const for declaring constants?
Mention four important string handling functions in c languages .