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 |
b) 4 c) 6 d) 7 32. Any C program a) must contain at least one function b) need not contain ant function c) needs input data d) none of the above 33. Using goto inside for loop is equivalent to using a) continue b) break c) return d)none of the above 34. The program fragment int a=5, b=2; printf(“%d”,a+++++b); a) prints 7 b)prints 8 c) prints 9 d)none of the above 35. printf(“ab” , “cd”,”ef”); prints a) ab abcdef c) abcdef, followed by garbage value d) none of the above 36. Consider the following program segment. i=6720; j=4; while((i%j)==0) { i=i/j; j=j+1; } On termination j will have the value a) 4 b) 8 c) 9 d) 6720
Explain what is the stack?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
explain memory layout of a C program
How do I use void main?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
Study the Following Points: a.One Cannot Take the address of a Bit Field b.bit fields cannot be arrayed c.Bit-Fields are machine Dependant d.Bit-fields cannot be declared as static 1. Which of the Following Statements are true w.r.t Bit- Fields A)a,b&c B)Only a & b C)Only c D)All
int n=1; while(1) { switch(n) { case 1:printf("a"); n++; continue; case 2:printf("b"); n++; continue; default : printf("c"); break; } break; }
write c program to display output 10(10+20)+(10+20+30)+ ... n term
0 Answers Hindustan Gum Chemicals,
What is substring in c?
why TCS selected more student in the software field from all institution.
What do you understand by friend-functions? How are they used?