simple c program for 12345 convert 54321 with out using string
Answer Posted / rajan sonvane
#include<stdio.h>
#include<conio.h>
main()
{
int *p,a[5]={1,2,3,4,5},b[5],i=0;
p=a;
while(i<5)
{
b[i]=*(p+4-i);
i++;
}
for(i=0; i<5; i++)
{
printf("%d",b[i]);
}
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain what is the stack?
Are the outer parentheses in return statements really optional?
Why shouldn’t I start variable names with underscores?
Explain that why C is procedural?
What is #include cctype?
Simplify the program segment if X = B then C ← true else C ← false
What type is sizeof?
Write a program to print "hello world" without using a semicolon?
Why do we use & in c?
What is a nested loop?
What is the size of array float a(10)?
What is use of null pointer in c?
Why do we need arrays in c?
In C language what is a 'dangling pointer'?
What is the c language function prototype?