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

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

1093


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

1051


If you know then define #pragma?

1061


How is a pointer variable declared?

1039


Is array name a pointer?

1006


What is the difference between class and object in c?

1115


What is assert and when would I use it?

975


What is adt in c programming?

1122


What are the types of unary operators?

1149


What is the use of a ‘’ character?

1051


What is calloc() function?

1060


What is extern variable in c with example?

970


Explain how can I prevent another program from modifying part of a file that I am modifying?

1047


I came across some code that puts a (void) cast before each call to printf. Why?

1170


What is size of union in c?

990