Program to find the absolute value of given integer using
Conditional Operators
Answer Posted / apoorv gaurav
#include<stdio.h>
int main()
{
int a;
printf("Enter any number");
scanf("%d",&a);
if(a>=0)
printf("%d",a);
printf("%d",(-1*a));
return 0;
}
| Is This Answer Correct ? | 7 Yes | 5 No |
Post New Answer View All Answers
What is adt in c programming?
Why should I use standard library functions instead of writing my own?
What does node * mean?
What are the properties of union in c?
What is the total generic pointer type?
Explain what are multibyte characters?
Do array subscripts always start with zero?
Explain the use of fflush() function?
Explain do array subscripts always start with zero?
Not all reserved words are written in lowercase. TRUE or FALSE?
Write a program to print numbers from 1 to 100 without using loop in c?
How can I get back to the interactive keyboard if stdin is redirected?
What is || operator and how does it function in a program?
How do you search data in a data file using random access method?
How do we print only part of a string in c?