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 is the difference between functions abs() and fabs()?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
How many keywords (reserve words) are in c?
how to make a scientific calculater ?
How can a process change an environment variable in its caller?
What is pass by reference in c?
What is derived datatype in c?
Why header file is used in c?
How to implement a packet in C
Where local variables are stored in c?
Are bit fields portable?
Write a program of prime number using recursion.
Explain what are the different file extensions involved when programming in c?
What is malloc return c?
Is multithreading possible in c?