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 do you understand by friend-functions? How are they used?
Why is c platform dependent?
the question is that what you have been doing all these periods (one year gap)
What are the parts of c program?
How does pointer work in c?
What is sizeof array in c?
What is else if ladder?
What is hashing in c?
What are the different types of linkage exist in c?
What are the properties of union in c?
What is a newline escape sequence?
What are the 5 types of inheritance in c ++?
How do you construct an increment statement or decrement statement in C?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
Write the test cases for checking a variable having value in range -10.0 to +10.0?