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 are the uses of a pointer?
Why we use conio h in c?
What is the difference between exit() and _exit() function?
What is main function in c?
What is the difference between if else and switchstatement
Explain setjmp()?
What is the use of c language in real life?
Is there any demerits of using pointer?
What is a structure in c language. how to initialise a structure in c?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
Without Computer networks, Computers will be half the use. Comment.
write a program to rearrange the array such way that all even elements should come first and next come odd
How does struct work in c?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
Why we write conio h in c?