To find whether a number is even or odd without using any
conditional operator??
Answer Posted / mukul garg
main()
{
int num;
clrscr();
printf("enter the number");
scanf("%d",&num);
(num%2==0)?printf("even num"):printf("odd num");
}
| Is This Answer Correct ? | 13 Yes | 16 No |
Post New Answer View All Answers
How many types of functions are there in c?
What is difference between union All statement and Union?
Explain what are the different file extensions involved when programming in c?
What is a program flowchart and how does it help in writing a program?
What is c definition?
What does double pointer mean in c?
What is return type in c?
Explain why c is faster than c++?
Where are local variables stored in c?
Are the variables argc and argv are always local to main?
can we change the default calling convention in c if yes than how.........?
Write a function that will take in a phone number and output all possible alphabetical combinations
Do character constants represent numerical values?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
Explain the properties of union. What is the size of a union variable