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 / abdur rab

#include <stdio.h>

int main ( int argc, char* argv [] )
{
int value = -10;
printf ("\n%d", ( value >= 0 ) ? value : ~(value)
+1 );
}

Is This Answer Correct ?    16 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there a way to compare two structure variables?

1127


Tell me when is a void pointer used?

1186


Write a program to check whether a number is prime or not using c?

1061


What is malloc calloc and realloc in c?

1338


What is the difference between c &c++?

1159


what is reason of your company position's in india no. 1.

2341


What is optimization in c?

1020


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1129


Are negative numbers true in c?

1069


How many types of errors are there in c language? Explain

991


Give basis knowledge of web designing ...

2021


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2761


Where is volatile variable stored?

1092


What is the use of putchar function?

1059


What are void pointers in c?

999