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

#include<stdio.h>
int main()
{
int a;
printf("Enter any number");
scanf("%d",&a);
if(a>=0)
printf("%d",a);
printf("%d",(-1*a));
return 0;
}

Is This Answer Correct ?    7 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is adt in c programming?

1225


Why should I use standard library functions instead of writing my own?

1313


What does node * mean?

1304


What are the properties of union in c?

1111


What is the total generic pointer type?

1211


Explain what are multibyte characters?

1255


Do array subscripts always start with zero?

1366


Explain the use of fflush() function?

1132


Explain do array subscripts always start with zero?

1284


Not all reserved words are written in lowercase. TRUE or FALSE?

1277


Write a program to print numbers from 1 to 100 without using loop in c?

1136


How can I get back to the interactive keyboard if stdin is redirected?

1234


What is || operator and how does it function in a program?

1161


How do you search data in a data file using random access method?

1360


How do we print only part of a string in c?

1078