How to write the code of the program to swap two numbers
with in one statement?
Answers were Sorted based on User's Feedback
Answer / rajitha
#include<stdio.h>
main()
{
int a=3,b=4;
b=a+b-(a=b);
printf("%d",a);
printf("%d",b);
}
| Is This Answer Correct ? | 19 Yes | 4 No |
Answer / manoj kumar shukla
main()
{
int a=4,b=3;
a=a+b-(b=a);
printf("%d",a);
printf("%d",b);
}
| Is This Answer Correct ? | 6 Yes | 2 No |
What is the output of the below program and how it is? void main() { static int var=5; printf("%d",var--); if(var) main(); }
8 Answers MindFire, TCS, Tech Mahindra,
What does malloc () calloc () realloc () free () do?
Program to swap the any two elements in an array containing N number of elements?
1 Answers Bosch, Glenwood, Ugam Solutions,
Explain about C function prototype?
please can some one guide me, to the answer Write a C program to enter 15 numbers as an input from the keyboard and program will find and print odd numbers and their average. i have studied while and do while loop for loop if and else if switch
What is the difference between class and object in c?
What extern c means?
Why double pointer is used in c?
write a program for even numbers?
What is the purpose of scanf() and printf() functions?
the maximum width of a c variable name can be a) 6 characters b) 8 characters c) 10 characters d) 20 characters
the data type used for unlimited value in c and how to do this program