Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain what are global variables and explain how do you declare them?

1175


What is indirection in c?

1074


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1347


what is use of malloc and calloc?

1906


Distinguish between actual and formal arguments.

1085


What does the error message "DGROUP exceeds 64K" mean?

1229


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5957


How can I write functions that take a variable number of arguments?

1130


How are portions of a program disabled in demo versions?

1298


What is auto keyword in c?

1208


What is pointers in c with example?

1078


What is the use of getchar() function?

1135


Explain the properties of union.

1087


What's a good way to check for "close enough" floating-point equality?

1167


What are reserved words with a programming language?

1142