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
the question is that what you have been doing all these periods (one year gap)
What is indirection?
What is a structure and why it is used?
What does. int *x[](); means ?
How a string is stored in c?
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
What is the difference between %d and %i?
Is array name a pointer?
Why flag is used in c?
How can you be sure that a program follows the ANSI C standard?
Explain how can I read and write comma-delimited text?
What are dangling pointers in c?
Write the control statements in C language
What is an lvalue?
What are void pointers in c?