program to find the ASCII value of a number

Answer Posted / dhinakar

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>

void main()
{
char num;
printf("Enter the number");
scanf("%c",&num);
printf("ASCII of %d is %d\n",atoi(&num),num);

}

Is This Answer Correct ?    7 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none

639


Why array is used in c?

549


How can I write functions that take a variable number of arguments?

620


What is s in c?

607


Is file a keyword in c?

496






Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

597


Tell me can the size of an array be declared at runtime?

592


Why functions are used in c?

580


Explain the use of 'auto' keyword

673


what are the facialities provided by you after the selection of the student.

1650


Write a program to generate the Fibinocci Series

656


Explain what does a function declared as pascal do differently?

634


What are the benefits of organizational structure?

566


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

663


What are the different types of C instructions?

669