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

Describe how arrays can be passed to a user defined function

775


What does return 1 means in c?

579


How do you initialize pointer variables?

605


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

737


Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

2644






How do you print only part of a string?

606


What is typedef?

660


What is a wrapper function in c?

576


Explain how to reverse singly link list.

601


How can you find the day of the week given the date?

609


Why c is called procedure oriented language?

575


please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

1535


What is anagram in c?

510


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

657


What is calloc in c?

654