Program to find the absolute value of given integer using
Conditional Operators
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int m;
printf("enter the value of m:");
scanf("%d",&m);
(m>=0?printf("%d",m):printf("%d",-(-m)));
getch();
}
| Is This Answer Correct ? | 37 Yes | 38 No |
Post New Answer View All Answers
Explain what are global variables and explain how do you declare them?
What is indirection in c?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
what is use of malloc and calloc?
Distinguish between actual and formal arguments.
What does the error message "DGROUP exceeds 64K" mean?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
How can I write functions that take a variable number of arguments?
How are portions of a program disabled in demo versions?
What is auto keyword in c?
What is pointers in c with example?
What is the use of getchar() function?
Explain the properties of union.
What's a good way to check for "close enough" floating-point equality?
What are reserved words with a programming language?