Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
char a1[50];
int a2[50];
printf("enter the characters :");
gets(a1);
for(int i=0;a1[i]!='\0';i++)
a2[i]=(int)a1[i]; // TYPE CASTING
for(i=0;a1[i]!='\0';i++)
printf("%d",a2[i]);
getch();
}
thank you
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Why do we use & in c?
What is the most efficient way to store flag values?
How can I send mail from within a c program?
What is a pragma?
Why c is called free form language?
Write a program to find factorial of a number using recursive function.
How can you check to see whether a symbol is defined?
List the difference between a "copy constructor" and a "assignment operator"?
what is the difference between class and unio?
write a c program in such a way that if we enter the today date the output should be next day's date.
What is the difference between c &c++?
Are the variables argc and argv are local to main?
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
Define the scope of static variables.