Program to find the absolute value of given integer using
Conditional Operators
Answer Posted / vignesh1988i
#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 ? | 37 Yes | 38 No |
Post New Answer View All Answers
Explain how many levels deep can include files be nested?
What does c mean in basketball?
How do you convert strings to numbers in C?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
What is the time and space complexities of merge sort and when is it preferred over quick sort?
What are integer variable, floating-point variable and character variable?
Is c call by value?
Can we use any name in place of argv and argc as command line arguments?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What is a shell structure examples?
How to draw the flowchart for structure programs?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
Explain what is the purpose of "extern" keyword in a function declaration?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
What is infinite loop?