Write a program to find given number is even or odd without
using any control statement.
Answer Posted / rani
#include<stdio.h>
#include<conio.h>
void main()
{
char str[][10]={"even","odd"};
int no;
clrscr();
printf("\nEnter a number...");
scanf("%d",&no);
printf("\n%d is %s",no,str[no%2]);
getch();
}
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
What was noalias and what ever happened to it?
What does 3 mean in texting?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
What is stack in c?
What is difference between union All statement and Union?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
What is c preprocessor mean?
What is the difference between array_name and &array_name?
What is an auto keyword in c?
what are enumerations in C
What is maximum size of array in c?
What do you mean by Recursion Function?
What is a const pointer?
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
How many identifiers are there in c?