Answer Posted / raj
main()
{
int a[5];
char c[5]={'1','2','3','4','5'};
int i;
for(i=0;i<5;i++)
a[i]=c[i]-'0';
for(i=0;i<5;i++)
printf("%d ",a[i]);
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
if p is a string contained in a string?
Why & is used in c?
What is integer constants?
what type of questions arrive in interview over c programming?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
Explain how can you determine the size of an allocated portion of memory?
Can math operations be performed on a void pointer?
Do you know the difference between malloc() and calloc() function?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What is a structure member in c?
How is a null pointer different from a dangling pointer?
What's the difference between constant char *p and char * constant p?
What is the use of #include in c?
How can I get random integers in a certain range?
How can a process change an environment variable in its caller?