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 sizeof c?

1070


Explain low-order bytes.

1028


a c code by using memory allocation for add ,multiply of sprase matrixes

2790


What is %d called in c?

1223


Explain how can a program be made to print the line number where an error occurs?

1204


Explain enumerated types.

1028


Is c is a procedural language?

1088


What is the stack in c?

1130


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

1155


What is restrict keyword in c?

1103


What is an array in c?

1046


How can type-insensitive macros be created?

1168


Why is structure important for a child?

1097


What are different types of variables in c?

1060


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

1270