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 sizeof c?
Explain low-order bytes.
a c code by using memory allocation for add ,multiply of sprase matrixes
What is %d called in c?
Explain how can a program be made to print the line number where an error occurs?
Explain enumerated types.
Is c is a procedural language?
What is the stack in c?
What's a good way to check for "close enough" floating-point equality?
What is restrict keyword in c?
What is an array in c?
How can type-insensitive macros be created?
Why is structure important for a child?
What are different types of variables in c?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?