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
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
What is assignment operator?
What is wild pointer in c?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
Why is void main used?
Is it better to bitshift a value than to multiply by 2?
Do variables need to be initialized?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
How can I trap or ignore keyboard interrupts like control-c?
Why can’t we compare structures?
What are valid signatures for the Main function?
What are the 3 types of structures?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
List out few of the applications that make use of Multilinked Structures?
What is function prototype in c with example?