Program to find the absolute value of given integer using
Conditional Operators
Answer Posted / ravi vishwakarma
#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 ? | 38 Yes | 6 No |
Post New Answer View All Answers
What is #ifdef ? What is its application?
what are the advantages of a macro over a function?
What are the c keywords?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
Why void main is used in c?
What does %p mean?
what is reason of your company position's in india no. 1.
What are the types of macro formats?
Is exit(status) truly equivalent to returning the same status from main?
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
Who is the founder of c language?
How does #define work?
Explain what is gets() function?
What is the Purpose of 'extern' keyword in a function declaration?
What are called c variables?