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


Please Help Members By Posting Answers For Below Questions

What is the importance of c in your views?

1237


What functions are used for dynamic memory allocation in c language?

1212


What is return in c programming?

1021


What is maximum size of array in c?

1085


What is scope of variable in c?

1088


How can I automatically locate a programs configuration files in the same directory as the executable?

1231


What is bin sh c?

1097


Simplify the program segment if X = B then C ← true else C ← false

3065


How are strings stored in c?

1079


What is string constants?

1202


What is class and object in c?

1175


Differentiate between null and void pointers.

1230


How can you access memory located at a certain address?

1162


What is the difference between union and anonymous union?

1374


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1137