write a program to swap Two numbers without using temp variable.

Answer Posted / bhokal

#include <stdio.h>
#include <stdlib.h>

void main()
{
int p,r;
printf("enter no to b swaped:\n");
scanf("%d%d",&p,&r);
printf("swapped no . are\n%d\n%d\n",r,p);
getch();
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to reverse a string.

631


What is typedef example?

614


Can the “if” function be used in comparing strings?

584


Can we use visual studio for c?

544


Difference between Function to pointer and pointer to function

625






Explain can static variables be declared in a header file?

674


Explain what happens if you free a pointer twice?

608


what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555

2528


What is the use of putchar function?

646


Explain why C language is procedural?

766


What is a header file?

631


Which is better malloc or calloc?

645


Do pointers need to be initialized?

556


Can we compile a program without main() function?

628


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

637