#include<stdio.h>
#include<conio.h>
# define swap(a,b) temp=a; a=b; b=temp;
void main( )
{
int i, j, temp;
i=5;
j=10;
temp=0;
if( i > j)
swap( i, j );
printf( "%d %d %d", i, j, temp);
}

Answer Posted / ashishrajvanshi01

On compiling i got ans 10, 0, 0. I did not understand the concept. Please expalin this to me.

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is fortran still used in 2018?

564


Is c programming hard?

553


What is default value of global variable in c?

533


Which type of language is c?

620


What is the difference between local variable and global variable in c?

659






Is the exit() function same as the return statement? Explain.

642


What is difference between %d and %i in c?

667


What is the difference between array and linked list in c?

566


How can I access an I o board directly?

597


Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80

2520


What is a global variable in c?

567


Explain how do you override a defined macro?

557


What is the difference between null pointer and wild pointer?

613


What is a structure in c language. how to initialise a structure in c?

581


What is a ternary operator in c?

621