Find greatest of two numbers using macro

Answer Posted / sourav ray

#include<stdio.h>
#include<conio.h>
#define big(a,b) (a>b)?a:b
void main()
{int x,y;
clrscr();
printf("enter the valus of x and y:\n");
scanf("%d%d",&x,&y);
printf("the biggest value is",big(x,y)");
getch();
}

Is This Answer Correct ?    16 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is structure data type in c?

572


What does return 1 means in c?

587


Are pointers integers in c?

611


write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

2455


Do variables need to be initialized?

621






What is sizeof c?

609


What is sizeof int in c?

604


Is it possible to use curly brackets ({}) to enclose single line code in c program?

800


How will you find a duplicate number in a array without negating the nos ?

1648


pierrot's divisor program using c or c++ code

1732


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2201


console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above

655


Explain what are the advantages and disadvantages of a heap?

597


How can a number be converted to a string?

607


define string ?

669