Write a program to find given number is even or odd without
using any control statement.
Answer Posted / saneemask
main()
{
{
char a[][5]= {"Even","Odd"};
int n;
printf("Enter any no.: ");
scanf("%d",&n);
printf("%s",a[n%2]);
getch();
}
{
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is FIFO?
Why we use conio h in c?
What are the types of type specifiers?
Explain the use of fflush() function?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
What are register variables 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
What is volatile variable how do you declare it?
What is unary operator?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
what are the advantages of a macro over a function?
Differentiate between ordinary variable and pointer in c.
Why can arithmetic operations not be performed on void pointers?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
Which header file is essential for using strcmp function?