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
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
How can you avoid including a header more than once?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
What is spark map function?
What is type qualifiers?
What is the use of a static variable in c?
Add Two Numbers Without Using the Addition Operator
Is there a way to compare two structure variables?
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...
What is calloc() function?
Multiply an Integer Number by 2 Without Using Multiplication Operator
What is the difference between malloc() and calloc()?
What are the storage classes in C?
What is oops c?
What is function in c with example?