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
Explain what is the difference between null and nul?
Once I have used freopen, how can I get the original stdout (or stdin) back?
Can true be a variable name in c?
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
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
If null and 0 are equivalent as null pointer constants, which should I use?
How can you find out how much memory is available?
Write a program to reverse a given number in c?
Is it possible to initialize a variable at the time it was declared?
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?
Is c is a middle level language?
Where are some collections of useful code fragments and examples?
What is the use of header files?
Explain how can I convert a string to a number?
What is structure pointer in c?