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
How to compare array with pointer in c?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
Where are the auto variables stored?
how we can make 3d venturing graphics on outer interface
write a program to rearrange the array such way that all even elements should come first and next come odd
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
Explain what are the __date__ and __time__ preprocessor commands?
Why pointers are used?
What are structural members?
What is the difference between ++a and a++?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
What is the difference between typedef struct and struct?
How old is c programming language?
How will you write a code for accessing the length of an array without assigning it to another variable?