Write a program to accept a character & display its
corrosponding ASCII value & vice versa?
Answers were Sorted based on User's Feedback
Answer / govindkrishna
#include<stdio.h>
#include<conio.h>
main()
{
char ch;
printf("enter any charecter %c /n");
scanf("%c ",&ch);
printf("the ACSCII value is %d= /n",ch);
}
Is This Answer Correct ? | 61 Yes | 30 No |
Answer / priya
Can any one tell me the answer....
if any one knows the answer pls mail the answer at this id
plsss
priya_del06@yahoo.com
Is This Answer Correct ? | 33 Yes | 16 No |
Answer / rukmanee
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("\n enter a character :");
scanf("%c",&ch);
printf("the corresponding ascii value of the given
character is %d",ch);
getch();
}
Is This Answer Correct ? | 31 Yes | 17 No |
Answer / pansare sandeep
#include <iostream.h>
#include<conio.h>
void main()
{
char c;
int d;
clrscr();
cout<<"Enter any key"<<endl;
cin>>c;
d=c;
cout<<"Corresponding ascii is "<<d;
getch();
}
Is This Answer Correct ? | 11 Yes | 6 No |
Answer / 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 |
Answer / priya.m
#include<iostream.h>
#include<conio.h>
void main()
char c;
int a;
clrscr();
cout<<"enter any word"<<photo;
cin>>c;
a=c;
cout<"corresponding ASCII is"<<a;
getch();
}
Is This Answer Correct ? | 2 Yes | 4 No |
Answer / pawankumar
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int x;
char y;
printf("enter the number");
scanf("%d",&x);
printf("enter the char");
scanf(" %c",&y);
if(sizeof(x)==4)
{
printf("the equivalent char for given
integer is %c ",x);
}
if(sizeof(y)==1)
{
printf("the equivalent integer for given
char is %d ",y);
}
}
Is This Answer Correct ? | 8 Yes | 15 No |
Answer / ashokan m
#include<stdio.h>
#include<conio.h>
main()
{
clrscr();
int x;
char y;
printf("enter the number");
scanf("%d",&x);
printf("enter the char");
scanf("%c",&y);
if(sizeof(x)==2))
{
printf("the equivalent char for given integer is %c ",x);
}
elseif(sizeof(y)==1)
printf("the equivalent integer for given char is %d ",y);
getch();
}
Is This Answer Correct ? | 38 Yes | 52 No |
Function shall sum members of given one-dimensional array. However, it should sum only members whose number of ones in the binary representation is higher than defined threshold (e.g. if the threshold is 4, number 255 will be counted and 15 will not) - The array length is arbitrary - output the results to the stdout
What is period operator in c?
What is abstract data structure in c?
pierrot's divisor program using c or c++ code
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
Is main() function predfined or userdefined?
write function to reverse char array ... without using second array
Are local variables initialized to zero by default in c?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
What are the features of c languages?
How can I convert integers to binary or hexadecimal?