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 #ifdef ? What is its application?

1054


what are the advantages of a macro over a function?

1096


What are the c keywords?

1146


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

2039


Why void main is used in c?

999


What does %p mean?

1032


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

2231


What are the types of macro formats?

1059


Is exit(status) truly equivalent to returning the same status from main?

1008


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

1075


Who is the founder of c language?

1108


How does #define work?

1011


Explain what is gets() function?

1013


What is the Purpose of 'extern' keyword in a function declaration?

1033


What are called c variables?

1012