Answer Posted / santhi perumal
#include<stdio.h>
#include<conio.h>
//To calculate a-b
void main()
{
int a,b,min,max;
printf("Enter the value of a and b \n");
scanf("%d %d",&a,&b);
min = (a<b)?a:b;
max = (a>b)?a:b;
while(min--) max--;
if(a<b)
printf("-%d",max);
else
printf("%d",max);
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain what is dynamic data structure?
Write a program to find factorial of a number using recursive function.
How to throw some light on the b tree?
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
What are the Advantages of using macro
What is zero based addressing?
What is the data segment that is followed by c?
What are the advantages of union?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
Write a program on swapping (100, 50)
What is c value paradox explain?
write a c program in such a way that if we enter the today date the output should be next day's date.
Can include files be nested? How many levels deep can include files be nested?
Do you know null pointer?
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;