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
What is difference between far and near pointers?
What are the loops in c?
What is difference between union and structure in c?
What is the most efficient way to count the number of bits which are set in an integer?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
Is a pointer a kind of array?
What are different storage class specifiers in c?
What is variable initialization and why is it important?
the question is that what you have been doing all these periods (one year gap)
How the c program is executed?
What is declaration and definition in c?
Explain do array subscripts always start with zero?
regarding pointers concept
What is time null in c?