#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
Is fortran still used in 2018?
Is c programming hard?
What is default value of global variable in c?
Which type of language is c?
What is the difference between local variable and global variable in c?
Is the exit() function same as the return statement? Explain.
What is difference between %d and %i in c?
What is the difference between array and linked list in c?
How can I access an I o board directly?
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
What is a global variable in c?
Explain how do you override a defined macro?
What is the difference between null pointer and wild pointer?
What is a structure in c language. how to initialise a structure in c?
What is a ternary operator in c?