write a function which accept two numbers from main() and
interchange them using pointers?
Answer Posted / sarathi
#include<stdio.h>
main()
{
int *p,*q;
*p=10;
*q=20
void swap(int &p,int &q);
}
void swap(int *x,int *y);
{
int *tmp;
*tmp=*x;
*x=*y;
*y=*x;
printf("%d,%d",*x,*y);
}
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
What are the key features in c programming language?
Are there any problems with performing mathematical operations on different variable types?
What is dynamic memory allocation?
What is huge pointer in c?
Define Array of pointers.
Explain what does the format %10.2 mean when included in a printf statement?
How do I convert a string to all upper or lower case?
What is array in C
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What are global variables and how do you declare them?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
What are the 4 data types?
What is page thrashing?
Why c is called object oriented language?
can anyone please tell about the nested interrupts?