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
Why is struct padding needed?
What is c standard library?
Write program to remove duplicate in an array?
How do you define a function?
What does nil mean in c?
What is the maximum no. of arguments that can be given in a command line in C.?
What is static identifier?
Where in memory are my variables stored?
Explain c preprocessor?
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
What is the size of enum in c?
Write a program to print “hello world” without using semicolon?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
can we implement multi-threads in c.